SnabbCo/snabbswitch — pull request #64 by justincormack (2013-05-04 16:46:42+00:00)
Title: Register changes

The current version creates a new metatable for every register, which is somewhat wasteful, so cleaned these up to share metatables, plus remove the runtime checks for register type in favour of different metatables with appropriate methods.

I am somewhat inclined to make registers into ffi metatypes not Lua tables, as then they would be jitted to straight memory accesses, and basically just be pointers with methods. The names would then need to move to the register collection rather than each register.