Skip to content

Conversation

@kmod
Copy link
Collaborator

@kmod kmod commented Jun 4, 2015

I had to remove a few of the hottest ones (gc_alloc, isSubclass), but with that it cuts the StatTimer overhead from +80% (on a very simple benchmark) to about +10%.

kmod and others added 5 commits June 3, 2015 21:25
This roughly halves stattimer overhead, from +80% to +40%
(on a very small benchmark; more complex benchmarks probably
have lower overhead)
I would have expected this to help a bunch but it seems to actually hurt
Main change is separating the representation of the timer stack (StatTimer) from
the manipulation of it (ScopedStatTimer).  This makes it easier to keep the different
use cases (top level timers vs non-top-level) separate without having the individual
functions check whether they think they are a top-level timer or not.
@kmod kmod self-assigned this Jun 4, 2015
@kmod kmod changed the title Optimize statcounters Optimize stattimers Jun 4, 2015
kmod added a commit that referenced this pull request Jun 4, 2015
@kmod kmod merged commit 57a0f30 into pyston:master Jun 4, 2015
@kmod kmod deleted the optimize_statcounters branch June 4, 2015 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant