-
Herbert Valerio Riedel authored
This optimises the `[Int]` representation to a 16-byte heap object for ~99% of version numbers (up to 4 components, each within a [0..0xfffe] value range) occuring on Hackage. One noteworthy improvement of this optimisation is a significant reduction of the size of the 01-index.cache file from previously 6299700 bytes (before #3905) down to 3408864 bytes, i.e. down to ~54% Also, this reduces the memory footprint and GC overhead a bit for e.g. `cabal info zzz` (which reads in the index cache) from cabal.0: There is no package named 'zzz'. You may need to run 'cabal update' to get the latest list of available packages. 859,337,368 bytes allocated in the heap 447,261,128 bytes copied during GC 37,385,208 bytes maximum residency (19 sample(s)) 1,311,136 bytes maximum slop 103 MB total memory in use (0 MB lost due to fragmentation) Tot time (elapsed) Avg pause Max pause Gen 0 1613 colls, 0 par 0.268s 0.268s 0.0002s 0.0012s Gen 1 19 colls, 0 par 0.227s 0.227s 0.0119s 0.0506s TASKS: 4 (1 bound, 3 peak workers (3 total), using -N1) SPARKS: 0 (0 converted, 0 overflowed, 0 dud, 0 GC'd, 0 fizzled) INIT time 0.001s ( 0.001s elapsed) MUT time 0.431s ( 0.758s elapsed) GC time 0.495s ( 0.495s elapsed) EXIT time 0.006s ( 0.005s elapsed) Total time 0.934s ( 1.259s elapsed) Alloc rate 1,991,870,623 bytes per MUT second Productivity 46.9% of total user, 34.8% of total elapsed to cabal.1: There is no package named 'zzz'. You may need to run 'cabal update' to get the latest list of available packages. 834,314,392 bytes allocated in the heap 440,791,176 bytes copied during GC 36,663,112 bytes maximum residency (19 sample(s)) 2,225,040 bytes maximum slop 96 MB total memory in use (0 MB lost due to fragmentation) Tot time (elapsed) Avg pause Max pause Gen 0 1574 colls, 0 par 0.254s 0.254s 0.0002s 0.0007s Gen 1 19 colls, 0 par 0.223s 0.223s 0.0118s 0.0474s TASKS: 4 (1 bound, 3 peak workers (3 total), using -N1) SPARKS: 0 (0 converted, 0 overflowed, 0 dud, 0 GC'd, 0 fizzled) INIT time 0.001s ( 0.001s elapsed) MUT time 0.383s ( 0.699s elapsed) GC time 0.477s ( 0.477s elapsed) EXIT time 0.005s ( 0.005s elapsed) Total time 0.869s ( 1.182s elapsed) Alloc rate 2,175,866,164 bytes per MUT second Productivity 44.9% of total user, 33.0% of total elapsed
cbddd8cb