Originally Posted by Torhal
They've done this for the past few betas - I believe it's so they can optimize the default UI; cut out any instances of division-by-zero that are otherwise handled (likely less efficiently) by the live version's Lua parser. Division by zero is, after all, something most programmers code against, not for.
|
Lua is one of the few languages that makes use of the full
IEEE 754 specification for floating point numbers by allowing the casting of divide-by-zero into signed infinity. Whether this is natively done by the computer's floating point processor or trapped and substituted for by the Lua interpreter, it would be much faster since the execution lies in C code rather than forcing the check through the interpreter itself.
Their decision to force Lua to throw division-by-zero errors was to
make it act more like C.
Originally Posted by Bashiok
This is an intended change to keep the lua engine in line with changes to our game engine.
|