Message263181
> ... and it turns out that munmapping is not always that smart thing to do: http://stackoverflow.com/questions/36548518/variable-assignment-faster-than-one-liner
py -3 -m timeit "tuple(range(2000)) == tuple(range(2000))"
10000 loops, best of 3: 97.7 usec per loop
py -3 -m timeit "a = tuple(range(2000)); b = tuple(range(2000)); a==b"
10000 loops, best of 3: 70.7 usec per loop
Hum, it looks like this specific benchmark spends a lot of time to allocate one arena and then release it.
Maybe we should keep one "free" arena to avoid the slow mmap/munmap. But it means that we keep 256 KB of unused memory.
Maybe we need an heuristic to release the free arena after N calls to object allocator functions which don't need this free arena. |
|
Date |
User |
Action |
Args |
2016-04-11 14:29:05 | vstinner | set | recipients:
+ vstinner, StyXman, neologix, ztane |
2016-04-11 14:29:05 | vstinner | set | messageid: <1460384945.46.0.55942539388.issue26601@psf.upfronthosting.co.za> |
2016-04-11 14:29:05 | vstinner | link | issue26601 messages |
2016-04-11 14:29:05 | vstinner | create | |
|