Tuesday, July 22, 2008 [Tweets] [Favorites]

On the Counter-intuitiveness of Speed

Ned Batchelder:

I’m no expert in these matters, but I’ve read enough about pipelines and caches to know that this is entirely plausible. When the code is uncluttered with detours, it goes much faster than when the end of the loop pauses to consider whether to invoke the progress function. Ironically, actually calling the function and invoking all of the Python overhead is insignificant compared to the time lost to simply deciding (in C!) whether to call it.

Comments

Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment