> I know this will seem inefficient at first (two globals + double > indirection!). But we write high performance numerical computing code and > this has never been a bottleneck for us. If this ends up being your > bottleneck you are probably already very close to optimality anyway (or, > alternatively, need to ditch hash maps as your record structure and start > using C structs). > > Demetri > Thanks, I like the idea (would have dismissed it if I came up with it myself but - in the end the std:vector would add indirections as well, and the array lookup should be pretty cheap since it's only the integer part of the array. Just saw your message about the metatable on top of it, it seems I have something to play with! Kaj