Descriptionruntime: introduce helper persistentalloc() function
It is a caching wrapper around SysAlloc() that can allocate small chunks.
Use it for symtab allocations. Reduces number of symtab walks from 4 to 3
(reduces buildfuncs time from 10ms to 7.5ms on a large binary,
reduces initial heap size by 680K on the same binary).
Also can be used for type info allocation, itab allocation.
There are also several places in GC where we do the same thing,
they can be changed to use persistentalloc().
Also can be used in FixAlloc, because each instance of FixAlloc allocates
in 128K regions, which is too eager.
Patch Set 1 #Patch Set 2 : diff -r 139919984600 https://dvyukov%40google.com@code.google.com/p/go/ #Patch Set 3 : diff -r 139919984600 https://dvyukov%40google.com@code.google.com/p/go/ #
Total comments: 1
Patch Set 4 : diff -r dba8aba7724c https://dvyukov%40google.com@code.google.com/p/go/ #Patch Set 5 : diff -r dba8aba7724c https://dvyukov%40google.com@code.google.com/p/go/ #
MessagesTotal messages: 8
|