4 ms·
> then maybe figure out a way to stop storing what you don't need I'm not sure I understand why this is something you need to do. "Figure out a way to stop s
by admax88q 8y ago
> then maybe figure out a way to stop storing what you don't need
I'm not sure I understand why this is something you need to do. "Figure out a way to stop storing what you don't need." Who cares if you don't need it, or at least don't need it now, storage is cheap.
- apta 8y agoExactly. Plus, code that uses exceptions but does not encounter any throws should be faster than code that uses error checks. In the latter, there's always a cost even if there aren't any errors returned. However, the former can optimize for the (hopefully more common path) of no exceptions being thrown and avoid checks altogether.
- smilekzs 7y agoStorage is cheap but GC is not. Source: I worked for Microsoft on C# projects where GC was constantly the bottleneck. Reducing number of exceptions (especially those used for control flow) helped.