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

<- View Parent
WolfLink@sh.itjust.works ⁨1⁩ ⁨week⁩ ago

I’ve worked on a library that’s Python because the users of said library are used to Python.

The original version of the project made heavy use of numpy, so the actual performance sensitive code was effectively C++ and fourtran, which is what numpy is under the hood.

We eventually replaced the performance sensitive part of the code with Rust (and still some fourtran because BLAS) which ended up being about 10x faster.

source
Sort:hotnewtop