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 >> pygame-users
pygame-users
Re: [pygame] 2D vector class
by Richard Jones other posts by this author
Aug 22 2006 3:15PM messages near this date
Re: [pygame] 2D vector class | Re: [pygame] 2D vector class
On Wednesday 23 August 2006 02:57, Lenard Lindstrom wrote:
>  ... The instance dict is searched only if one is not
>  found. So having a descriptor reduces the search time. And a slot
>  descriptor does not do a dict lookup. So slots should be faster,
>  though I have not confirmed it.

The function call overhead (for the getter) is much greater than the fallback 
to a dict lookup (which is insanely fast). We did some optimisation of 
function calls at the Need For Speed sprint in Iceland, but I only managed to 
squeeze out a 5% improvement (aka "noise") and others didn't fare much 
better. I'd be interested to see some *actual* numbers, but I'd be surprised 
if slots are faster than regular attributes. Unless there's been some 
slot-specific optimisation I've missed along the way :)


     Richard
Thread:
Scott Nelson
Marius Gedminas
Brian Fisher
Scott Nelson
Brian Fisher
Alex Holkner
Brian Fisher
Brian Fisher
Ethan Glasser-Camp
Matthias Baas
Alex Holkner
Brian Fisher
Marius Gedminas
Brian Fisher
Lenard Lindstrom
Richard Jones
Richard Jones
Matthias Baas
Greg Ewing
Richard Jones
Greg Ewing
Ethan Glasser-Camp

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