Comment on Python Performance: Why 'if not list' is 2x Faster Than Using len()

<- View Parent
uis@lemm.ee ⁨1⁩ ⁨week⁩ ago
  1. Performance is often more tied to the code than to the interpreter - an O(n³) algorithm in blazing fast C won’t necessarily perform any better than an O(nlogn) algorithm in Python.

An O(n³) algorithm in Python won’t necessarily perform any better than an O(nlogn) algorithm in C. Ever heard of galactic algorithms?

source
Sort:hotnewtop