tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Preprocessor performance tuning


From: Vladimir Vissoultchev
Subject: Re: [Tinycc-devel] Preprocessor performance tuning
Date: Sun, 17 Apr 2016 04:13:16 +0300

Hi,

Here is a new version of the allocators with added auto-expansion on
capacity exhaustion by chaining a new allocator at the top w/ twice the
current capacity. This might incurs a slight perf degradation as the chain
of allocators has to be sometimes traversed on `tal_free` and rarely on
`tal_realloc` (when current allocator reaches capaticy it tries the smaller
ones down the linked list).

A possible optimization is when a spawned allocator gets all its chunks
unallocated it can unchain itself from the list as obviously at this time
the memory pressure is alleviated. But this will be too much code for such a
micro optimization IMO.

Initial allocator sizes are further reduced to 768KB + 768KB + 256KB --
smallest possible for compilation of "Hello world" source. Two chained
allocators (totaling 2304KB) should be enough for most (all) sources I could
find. tccboot is in another league here :-))

cheers,
</wqw>

-----Original Message-----
From: Tinycc-devel [mailto:address@hidden
On Behalf Of Sergey Korshunoff
Sent: Saturday, April 16, 2016 7:17 PM
To: address@hidden
Subject: Re: [Tinycc-devel] Preprocessor performance tuning

> You can try increasing `TOKSTR_TAL_SIZE` to 32MB. Then 256MB? When 
> usage
drops below 100% on Limit=128 allocator then you can start decreasing it, if
you have to fine tune the capacity.

Can this be tuned by some new tcc option? Or some option to automatically
increase limits (no limits)?

PS: ========================================
Before a patch:
step 1: compile & link
38397 idents, 6737338 lines, 196106244 bytes, 7.926 s, 850031 lines/s, 24.7
MB/s

Original values patch values:
step 1: compile & link
38397 idents, 6737338 lines, 196106244 bytes, 7.672 s, 878166 lines/s, 25.6
MB/s limit=  128, nb_peak= 5181, nb_total=36433, nb_missed=1921634,
nb_failed=1511286,   100%
limit=  256, nb_peak=38397, nb_total=38397, nb_missed=    0,
nb_failed=    0,  92.2%
limit= 1024, nb_peak=    5, nb_total= 1383, nb_missed=49297,
nb_failed=18439,   100%

TOKSTR_TAL_SIZE = 32 MB
step 1: compile & link
38397 idents, 6737338 lines, 196106244 bytes, 7.551 s, 892216 lines/s, 26.0
MB/s limit=  128, nb_peak= 6960, nb_total=581543, nb_missed=1314640,
nb_failed=966176,   100%
limit=  256, nb_peak=38397, nb_total=38397, nb_missed=    0,
nb_failed=    0,  92.2%
limit= 1024, nb_peak=    5, nb_total= 1383, nb_missed=49297,
nb_failed=18439,   100%

TOKSTR_TAL_SIZE = 256 MB
step 1: compile & link
38397 idents, 6737338 lines, 196106244 bytes, 7.374 s, 913643 lines/s, 26.6
MB/s limit=  128, nb_peak=10140, nb_total=1547719, nb_missed=221364,
nb_failed=    0,  34.7%
limit=  256, nb_peak=38397, nb_total=38397, nb_missed=    0,
nb_failed=    0,  92.2%
limit= 1024, nb_peak=    5, nb_total= 1383, nb_missed=49297,
nb_failed=18439,   100%

CSTR_TAL_SIZE = 32 MB
step 1: compile & link
38397 idents, 6737338 lines, 196106244 bytes, 7.330 s, 919093 lines/s, 26.8
MB/s limit=  128, nb_peak=10140, nb_total=1547719, nb_missed=221364,
nb_failed=    0,  34.7%
limit=  256, nb_peak=38397, nb_total=38397, nb_missed=    0,
nb_failed=    0,  5.76%
limit= 1024, nb_peak=    5, nb_total=19817, nb_missed=    0,
nb_failed=    0,  9.09%

_______________________________________________
Tinycc-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Attachment: 0001-Improve-hash-performance-and-reduce-allocations.zip
Description: Zip compressed data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]