]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: lua: make the functions hlua_gethlua() and hlua_sethlua() faster
authorThierry FOURNIER <tfournier@exceliance.fr>
Tue, 10 Mar 2015 01:40:29 +0000 (02:40 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 10 Mar 2015 16:18:24 +0000 (17:18 +0100)
commit38c5fd60b9f31ec0303f59dada503513d7065ca2
treef14bf40192edfd526cad6b0007904c07f0df0cac
parent76bd97f405805135588f3cf59867e2613dbeb6d2
MEDIUM: lua: make the functions hlua_gethlua() and hlua_sethlua() faster

Lua 5.3 provides an opaque space associated with each
coroutine stack. This patch uses this lot of memory to
store the "struct hlua *" associated pointer.

This patch makes the retrieval of the "struct hlua *"
associated struct faster because it replace a lookup in
a tree by an immediate access to the data.
src/hlua.c