|
 |
Warp wrote:
> Darren New <dne### [at] san rr com> wrote:
>> The compiler can be pretty smart.
>
> If you are doing a simple linear traversal, maybe, but if it's any more
> complicated than that...
True. One advantage the compiler[1] has is that it has the entire source
code in front of it when it compiles. So it can check that everywhere an
index gets called, the value is within range, for example.
But yes, obviously if the compiler could prove *everything*, there
wouldn't be a 4% slow-down with the compiler adding the checks. :-)
[1] Using the term loosely here...
--
Darren New / San Diego, CA, USA (PST)
Ever notice how people in a zombie movie never already know how to
kill zombies? Ask 100 random people in America how to kill someone
who has reanimated from the dead in a secret viral weapons lab,
and how many do you think already know you need a head-shot?
Post a reply to this message
|
 |