perf: nameToCLabel: Directly manipulate ByteString rather than going via strings
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