Skip to content

Conversation

kmod
Copy link
Collaborator

@kmod kmod commented Aug 14, 2015

django hits this a lot. two main things that were slow:

  • we didn't rewrite int() if it threw an exception
  • the error gets thrown calls repr() on the thing-that-couldn't-be-converted-to-an-int and that was slow too

Helps a lot on int() microbenchmarks but the perf impact on the macrobenchmarks is within measurement error. [I'm going to stop reporting the exact numbers for changes like this, since I think doing so just drives us crazy.]

kmod added 3 commits August 14, 2015 22:02
We currently over-build it quite a bit; I'll try to look into that
issue, but for now we can lessen the effects by at least building
it in parallel.
Probably more compatible, but also much faster.

Also, set str_cls->tp_repr.
kmod added a commit that referenced this pull request Aug 15, 2015
make `int("some_random_string")` faster
@kmod kmod merged commit 15cf8d0 into pyston:master Aug 15, 2015
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