Comment

Comment by queuebert

The more pertinent question to me is can we implement some new static analysis that understands buffer re-use and can hoist buffer initialization outside the loop? Rather than make the programmer write obfuscated code for efficiency, it is usually better to have the compiler do the heavy lifting.

P.S. Also, folks, don't re-use buffers without zeroing unless you absolutely need the performance and know what you're doing.

parent queuebert 1 year ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton