logoalt Hacker News

shaknayesterday at 1:38 PM1 replyview on HN

Tree shaking is pretty standard. Optimising out the write sounds fine to me - with the exception of a volatile pointer. That, there, is a mistake.


Replies

raverbashingyesterday at 2:08 PM

Optimizing out a write to (example) an array on the stack seems fine to me.

Optimizing out a function call to a heap pointer (especially memset) seems wrong to me. You called the function, it should call the function!

But it's again the C language saving time not wearing a seatbelt or checking the tire pressure for saving 10s on a 2h trip

show 1 reply