lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Thu, Sep 28, 2006 at 04:34:10PM -0500, Rici Lake wrote:
> >I picked an example of a function where the function-call overhead 
> >could
> >be annoying, purely for the sake of giving you an opportunity to 
> >explain
> >what kind of "higher-level interface" you were thinking of.
> 
> Well, I hope I answered that, in that case. The sort of higher-level 
> interface I was thinking of was:
> 
> regex on utf-8 strings
> 
> rendersize of utf-8 strings
> 
> mousehit in rendered strings

I don't see how that applies to any of the many examples I offered.
What kind of interface do you have in mind, that would avoid function
call overhead in exposing random number generation to Lua?

If what you mean is "don't do that kind of performance-sensitive stuff
in Lua, group it up in C and expose that whole thing to Lua", that's
fine--and my own approach, most of the time.  But, it's in contradiction
with the use of "performance" as a rationale for adding operators in
previous discussions.  You don't get to say performance is important
for the stuff you want--integer division--but not important for the
stuff other people want.  :)  But maybe I'm not understanding what
you mean.

-- 
Glenn Maynard