Optimizations and performance

Jack Stouffer via Digitalmars-d digitalmars-d at puremagic.com
Thu Jun 9 08:58:05 PDT 2016


On Thursday, 9 June 2016 at 15:44:04 UTC, Ola Fosheim Grøstad 
wrote:
> Otherwise people would benchmark numpy instead of Python etc.

While it's not a one-to-one analogy due to the fact that Appender 
is in Phobos, I think it would be totally reasonable to benchmark 
numpy instead of Python.

What's the first answer on any SO question about slow python 
code? Usually it's "use numpy". Most of the time, changing to 
numpy takes five minutes and can have a huge impact on your code 
speed with no decrease in readability. This is VERY indicative of 
normal Python use, and therefore it's useful to know that Python 
code can get to a certain speed with idiomatic use, which is what 
programmers should actually care about.

"How fast can my code get" rather than "How fast can my code get 
using this specific subset of the language and libraries".


More information about the Digitalmars-d mailing list