Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Why am I writing a Rust compiler in C?. Parent comment
Eg, quicksort vs bubble sort. Quicksort is usually more code but faster.
Or a linked list vs a btree. The linked list is less code, but the btree will be faster.
Or substring search, with or without simd. The simd version will be longer and more complex, but run faster.
Even in a for loop - if the compiler unrolls the loop, it takes up more code but often runs faster.
If you have two programs that both do the same work, and one is short and simple, I don’t think that tells you much about which will run faster.
There are no comments on this comment yet.
Eg, quicksort vs bubble sort. Quicksort is usually more code but faster.
Or a linked list vs a btree. The linked list is less code, but the btree will be faster.
Or substring search, with or without simd. The simd version will be longer and more complex, but run faster.
Even in a for loop - if the compiler unrolls the loop, it takes up more code but often runs faster.
If you have two programs that both do the same work, and one is short and simple, I don’t think that tells you much about which will run faster.