On Aug 13, 11:16 am, "Alf P. Steinbach" <
[email protected]> wrote:
[...]
the context is a compiler, so normally this would mean a one
time buildup of an abstract syntax tree where each tree node
has 4 of these bool's. I think we are talking about max a few
thousand nodes so all in all it seems useless.
(More likely a few tens of thousands of nodes, or even hundreds
of thousands. But still a lot less that the zillions Alf
mentioned.)
It's probably a waste of time today. It might have been less
useless back in the days of 16 bit machines, and might be a
holdover from then. (While it wastes programmer time to write
it when you don't need it, if you already have it, it's probably
not worth the programmer time to change it.) Or just a
programmer who got into the habit back then, and hasn't evolved.
Conceivably, if there's a special allocator for F, which ensures
locality, it might reduce cache misses and page faults some, but
I'd be fairly surprised if it made a noticeable difference.