- 18 Jul, 2015 2 commits
-
-
Kevin Modzelewski authored
well, except that two fields were swapped, and there is an extra struct wrapper in there. But with some small changes we can now let capi code use the list macros for faster list manipulation.
-
Kevin Modzelewski authored
They're not used any more, and even though they are empty NopLocks, they change the struct structure.
-
- 17 Jul, 2015 18 commits
-
-
Chris Toshok authored
Preparation for finalizer code, refactoring some simple_destructor logic.
-
Rudi Chen authored
-
Kevin Modzelewski authored
Convert "a in (b, c)" to "a == b or a == c"
-
Kevin Modzelewski authored
optimize regex handling
-
Kevin Modzelewski authored
some fixes and cleanups
-
Kevin Modzelewski authored
Another 2.7.9 compatibility fix
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
Do this by adding "contains" to our codegen type system, and implement a special contains on the unboxedtuple type. This makes this operation quite a lot faster, but it looks like largely because we don't implement a couple optimizations that we should: - we create a new tuple object every time we hit that line - our generic contains code goes through compare(), which returns a box (since "<" and friends can return non-bools), but contains will always return a bool, so we have a bunch of extra boxing/unboxing We probably should separate out the contains logic from the rest of the comparisons, since it works quite differently and doesn't gain anything by being there.
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
- copy CPython's implementation (that uses C slots) - implement the C slots for str and list - avoid doing a division for non-step slices
-
Kevin Modzelewski authored
It was unused
-
Kevin Modzelewski authored
Particularly for string slicing, where we would always memset the string data to zero, and then immediately memcpy it.
-
Kevin Modzelewski authored
- put it into a header file (and start including it) - move the grow-the-array part into a separate function to encourage the fast-path to get inlined.
-
Kevin Modzelewski authored
This division is expensive; the divisor is always sizeof(char) or sizeof(Py_UNICODE), and it seems to be faster to do a branch and then possibly a shift.
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
int(str) and int(float) don't always return ints (cant return longs, doh). If we call int() on a subclass of int, we should call its __int__ method in case the subclass overrode it.
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
And some other small cleanups
-
- 16 Jul, 2015 7 commits
-
-
Kevin Modzelewski authored
This only does the lexing portion of the process. Further cut that down into a re.split ubench
-
Rudi Chen authored
Replace the function pointer to the simple_destructor with a boolean indicating that the tp_dealloc function is safe to call whenever the simple_destructor used to be instead. A few additional classes are also specified to have a safe_tp_dealloc. For exceptions, use a hack where we look for the creation of exception classes and store them in a list so we can set their destructor at the same time as other classes.
-
Chris Toshok authored
Some refactors in GC code + class-freed-before-instance bug fix.
-
Rudi Chen authored
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
Add sre_compile_test.expected
-
Rudi Chen authored
In some rare instances, class objects can be freed before the last instance of that class, causing a problem in the sweep phase where we look at the class of the object being freed. So we keep unreachable classes around for an extra collection to be safe.
-
- 15 Jul, 2015 13 commits
-
-
Rudi Chen authored
-
Rudi Chen authored
-
Kevin Modzelewski authored
Ie, manually specify the reference output for sre_compile_test.py instead of running CPython to generate it. CPython changed the behavior (and interface) of _optimize_charset at some point between 2.7.7 (where we copied from) and 2.7.9. We should probably copy their new implementation (seems to have a few more optimizations), but for now this should fix #707.
-
Kevin Modzelewski authored
jemalloc
-
Daniel Agar authored
-
Kevin Modzelewski authored
some misc microoptimizations
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
Yes they exist, for example "try getting this attribute and if it exists call it, otherwise do something else". Probably not a huge perf improvement since the exception-throwing will probably dominate. Use the same "only do this for immortal strings" trick to get around gc issues.
-
Kevin Modzelewski authored
Only do this for calls with immortally-interned strings so that we can side-step the track-gc-references-in-ics issue for now.
-
Kevin Modzelewski authored
type speculation support
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
I have a whole bunch of mechanical changes to allow speculation, but I think our pre-existing speculation rules end up hurting the macrobenchmarks. I'd like to get those in and then separately work on making in beneficial.
-