ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> numpy-discussion
numpy-discussion
[Fwd: [Fwd: Re: [Numpy-discussion] Numpy and PEP 343]]
by Tim Hochberg other posts by this author
Mar 4 2006 7:00AM messages near this date
Re: [Numpy-discussion] numexpr | [Fwd: Re: [Numpy-discussion] Numpy and PEP 343]
Check this out:

  Expression: where(0.1*a >  arctan2(a, b), 2*a, arctan2(a,b))
  numpy: 0.706635284652
  Skipping weave timing
  numexpr: 0.19127785794
  Speed-up of numexpr over numpy: 3.69428689898

270% speed up! Pretty cool. Unfortunately, my implementation of two and 
three argument functions is still buggy if one of the arguments is a 
constant. I'm not sure what the best tactic is to deal with that. My 
strategy for dealing with opcodes that require more than three arguments 
(just 'where' at present) was to just use two opcode blocks. The second 
opcode block had the opcode OP_NOOP (which does nothing), but the first 
opcode steals arguments from it. It's pretty simple and more or less 
infinitely expandable.

I'm off to bed now, perhaps the answer to the constant dilemma will be 
clear in the morning.

[next morning]

OK, I know how to fix it, I just need to scrape together a few minutes to do it.


-tim







-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@[...].net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved