Tieske / uuid

A pure Lua uuid generator (modified from a Rackspace module)
http://tieske.github.io/uuid/
137 stars 50 forks source link

perf: cache global functions as module locals #4

Closed thibaultcha closed 8 years ago

thibaultcha commented 8 years ago

Caching of globals can improve performance by up to 30%. This caches global functions used in new(), which is likely to be heavily called.

Globals in randomseed() and seed() have a negligible impact due to the low frequency of calls to those functions.