Hacker News new | ask | show | jobs
by karmakaze 1312 days ago
The way to fix it in that manner here is to undo the 42% speedup and return the heap allocated object for the caller to mangle.
1 comments

Yes, if you are serious about backwards compat then you pay that cost and perhaps add a separate function that is faster for callers to opt into.
Effectively deprecating the old one and recommending the new one being a way to smoothly 'fix' an API.