Challenge: write a reference counted slice that works as much as possible like a built-in slice

Stanislav Blinov stanislav.blinov at gmail.com
Fri Nov 12 22:47:56 UTC 2021


On Friday, 12 November 2021 at 22:10:22 UTC, H. S. Teoh wrote:

> Life is too short to fuss over code that isn't even relevant to 
> performance in the big picture.

Life is too short to wait on programs that have no reason to be 
slow. If you're "rendering splash screen while loading 
resources", you're most likely doing something wrong. Your 
program should've been on screen and interactive ages ago. 
Granted, there can be exceptions (like slow storage), but those 
are very, very rare. Visual Studio has no business taking 8 
seconds to load just to show its start screen. But it does. In a 
team of 50 people, starting it up twice a day, it wastes 57 
man-hours a year. In other words, VS is a worker that comes in 7 
days a year with full salary and amenities, to do absolutely 
nothing.

"The rest of the code that only runs once in a while don't 
matter" is an anachronism that needs to die, with fire. Whether 
you run once or a hundred times, you bloody well should run as 
fast as you possibly can, because there's always someone (or 
something) waiting on you! Including your own CPU. At the very 
least, it's just irresponsible to run unnecessarily slow.

Scripts for your own self - fine, leave 'em as slow as you're 
willing to suffer through. But please don't inflict your 
sloth-ness on the rest of the world ;)


More information about the Digitalmars-d mailing list