Skip to content

perf: nameToCLabel: Directly manipulate ByteString rather than going via strings

Matthew Pickering requested to merge wip/name-to-clabel into master

nameToCLabel is called from lookupHsSymbol many times during bytecode linking. We can save a lot of allocations and time by directly manipulating the bytestrings rather than going via intermediate lists.

Before: 2GB allocation, 1.11s After: 260MB allocation, 375ms

Fixes #25719 (closed)

Edited by Rodrigo Mesquita

Merge request reports

Loading