To hash or not to hash (SOLVED)

Thanks. Premature optimization is the root of all evil said someone much wiser than I. My intent here is not so much to optimize as to avoid code carelessly sprinkled with a multitude of local constants with all the problems that engenders.

It also makes it a whole lot easier to make global alterations to the code. A case in point - acting on @britzl 's suggestion I dropped trapping the collision_response event and switched to trigger_response instead. Given that my comparisons were being done against a pre-defined string in a Lua module the switch involved about 0.5s of work.

Doing such things in the vain pursuit of saving off a few nano seconds here or there is, needless to say, an utterly futile exercise

1 Like