Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Software optimization resources for C++, assembly, Windows, Linux, BSD, Mac OS. Parent comment
Er, N is counting the input elements (eg number of nodes in a graph, array length, etc), O() is what counts algorithmic or microarchitectural events.
> Similarly, "if (c) a -= b;" may become "a -= (-c & b);".
Reminds me of speeding up a ECC loop by almost two orders of magnitude with (basically):
- if(i&(1<<k)) p ^= parity(x[i])<<k; + p32[k] ^= x[i] & -(ii&1); ii>>=1;
Er, N is counting the input elements (eg number of nodes in a graph, array length, etc), O() is what counts algorithmic or microarchitectural events.
> Similarly, "if (c) a -= b;" may become "a -= (-c & b);".
Reminds me of speeding up a ECC loop by almost two orders of magnitude with (basically):