Re:Big O Notation – Explained as easily as possible
by cgriswald on Saturday January 16, 2021 @12:55PM
(#25803895)
For Python code, I usually just ask critics if they’ve tested it (because I have). Frequently using a built-in will be faster than a custom loop even if at the surface level you’re going over the data more than once.
[ Parent
| on HN ]
Re:Big O Notation – Explained as easily as possible
by mhh__ on Saturday January 16, 2021 @01:18PM
(#25804090)
Anecdotally (it was a contrived sorting benchmark so the exact numbers don't really matter), Python started off about 3 times slower than D, but and grew at what would be considered the same O() but the coefficient was enormous. To the point where a D was taking 3s for n-million arrays, Python closer to one minute.
Node was actually very impressive, roughly as fast as D's reference compiler (cutting edge optimisations maybe 2 decades ago) in release mode.