Descriptionallocate memory manually in SkLiteDL
Instead of growing at SkTDArray's chosen rate (+4, then *1.25),
grow in additive 4K pages. This is my attempt to make realloc()
have the best chance of not copying and to keep fragmentation down.
Because we use a freelist the rate we grow doesn't affect performance
too much.
I'm not getting very reliable numbers, but this looks maybe 5-10% faster
for recording, mainly I think from inlining the allocation fast path into
push().
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2231553002
Committed: https://skia.googlesource.com/skia/+/b20283357a09300353dd62962086f3791161e3b8
Patch Set 1 #Patch Set 2 : O(1) #
Messages
Total messages: 17 (10 generated)
|