On 12/17/07, Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br>
wrote:
using pushstring() feels unoptimal.
That's the problem: it *feels* unoptimal but in reality, as Rici
reported,
it does not make any actual difference, not enough to warrant a
complicated,
error-prone, ugly API...
Yet another lesson at the wrong perceptions that we programmers
have about
performance...
i really want to agree; and of course it warrants a benchmark or two.
but still, using string constants in Lua is (almost?) as light as
using integers, and i'd like to have this from C; ideally using enums
that get translated to already-interned lua strings.
unfortunately, i don't believe there's a neat solution.
--
Javier