mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
while escape analysis didn't lie that the bytes underlying this string escaped to the heap, the reference to them died and led to us getting an undefined byte array underlying the string. sadly, this makes 4 allocs here (still down from 31), but only adds 100ns per op. I still don't get why 'buf' and 'byts' escape to the heap, blaming faulty escape analysis code. this one is kind of impossible to write a test for. found this from doing benchmarking stuff and was getting weird behavior at the end of runs where calls didn't find a slot, ran bisect on a known-good commit from a couple weeks ago and found that it was this. voila. this could explain the variance from the slack dude's benchmarks, too. anyway, confirmed that this fixes the issue.