#41 bug in the docs

closed-fixed
nobody
5
2004-10-29
2004-09-07
Anonymous
No

The doc says :

"A performance killer is the usage of the built-in functions map and
filter."

However, if the function used in map is a core builtin like int or str,
psyco does not seem to run slower than regular Python. Maybe in this
case it does not try to compile the function.

map(str, mylist) was faster than [str(x) for x in mylist] in this case.

Thus maybe map can be used with psyco on the condition of using only
functions like int or str ? It is quite useful. If this is the case, the docs
could need an update...

Thanks.

my email :
junk@boutiquenumerique.com

Discussion

  • Armin Rigo

    Armin Rigo - 2004-09-07

    Logged In: YES
    user_id=4771

    Good point. For built-ins, map() should not be so slow, but instead a bit faster (because the loop is done in compiled C code instead of the in the code generated by Psyco, which is not as good as a good C compiler can do).

    I'll update the docs.

     
  • Armin Rigo

    Armin Rigo - 2004-10-29
    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks