Array-Index-Prüfungen sind teuer? Falsch!

James Gosling:

One of the magics of modern compilers is that they’re able to “theorem-prove away” potentiall all [array] subscript checks. . . .

You might do a little bit of checking on the outside of the loop, but inside the loop, it just screams.

[The VM] had a crew of really bright people working on it for a decade, a lot of PhD compiler jockeys.

Quelle: Biancuzzi und Warden: Masterminds of Programming, O’Reilly, 2009

Codebeispiel: http://www.imn.htwk-leipzig.de/~waldmann/talk/12/osmop/(Folie 8 ff)



Johannes Waldmann 2014-07-10