Ok, here is a new version of the patch that uses custom allocators for small instances of `TokenSym`, `CString` and `TokenString`. I'm getting at least 15% boost here (45MB/s -> 55MB/s) as the `malloc`/`free` calls get down to less that 1% of overall exec time in the profiler.
This approach is preallocating at least 3MB of RAM for tiny instances, configurable through the new TOKSYM_TAL_SIZE, CSTR_TAL_SIZE and TOKSTR_TAL_SIZE in tcc.h along with the limit on instance sizes the allocators consider. With current settings I'm geting on all allocators no more that 70% buffer usage on (5 times) nginx sources compilation. cheers, </wqw> -----Original Message----- From: Tinycc-devel [mailto:[email protected]] On Behalf Of Sergey Korshunoff Sent: Friday, April 15, 2016 6:11 PM To: [email protected] Subject: Re: [Tinycc-devel] Preprocessor performance tuning > @seyko: Can you please test it with tccboot. I get a 7-8% better > overall tcc performance with the patch applied. Yes, this version is faster. But on tccboot there is only a 4% speedup: from 24.5 MiB/s to 25.5 MiB/s _______________________________________________ Tinycc-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/tinycc-devel _______________________________________________ Tinycc-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/tinycc-devel
