[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua Pre-compiler / Lua side userdata
- From: Patrick Donnelly <batrick@...>
- Date: Mon, 12 Oct 2009 15:58:55 -0400
On Mon, Oct 12, 2009 at 3:54 PM, Rob Kendrick <lua-l@nun.org.uk> wrote:
> Have you actually benchmarked this? The string will be folded into the
> constants table at compile time, and should take a similar amount of
> time to load from it as a numerical constant. Additionally, string
> comparison for equality boils down to a single pointer compare, so is
> very quick; not to mention more readable.
I believe his problem is comparing the option string to a long list of
options a la [1].
[1] http://www.lua.org/manual/5.1/manual.html#luaL_checkoption
--
-Patrick Donnelly
"Let all men know thee, but no man know thee thoroughly: Men freely
ford that see the shallows."
- Benjamin Franklin