[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.2.0 (work1) now available
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 12 Jan 2010 15:56:26 -0200
> On Tue, Jan 12, 2010 at 1:41 PM, Roberto Ierusalimschy
> <roberto@inf.puc-rio.br> wrote:
> >> luaT_typenames[LUA_TLIGHTUSERDATA] and luaT_typenames[LUA_TUSERDATA]
> >> should just be the same pointer to allow fast and safe
> >> pointer comparision (and save 9 bytes ;).
>
> Nice to see this thread converging, but I still don't get why
> strcmp(t1, t2) wouldn't cut it.
>
> The comparison is supposedly used only during error message handling,
> no? Is this a valid target for such an optimization?
I would turn around the question. Why not to use it? It is not an
optimization, it is a natural way to express that two types have the
same name. It is an extreme version of the DRY principle ;).
-- Roberto
- References:
- Re: [ANN] Lua 5.2.0 (work1) now available, Nevin Flanagan
- Re: [ANN] Lua 5.2.0 (work1) now available, Tom N Harris
- Re: [ANN] Lua 5.2.0 (work1) now available, Roberto Ierusalimschy
- Re: [ANN] Lua 5.2.0 (work1) now available, Tony Finch
- Re: [ANN] Lua 5.2.0 (work1) now available, Roberto Ierusalimschy
- Re: [ANN] Lua 5.2.0 (work1) now available, Duboucher Thomas
- Re: [ANN] Lua 5.2.0 (work1) now available, Tom N Harris
- Re: [ANN] Lua 5.2.0 (work1) now available, Klaus Ripke
- Re: [ANN] Lua 5.2.0 (work1) now available, Roberto Ierusalimschy
- Re: [ANN] Lua 5.2.0 (work1) now available, Andre Carregal