[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: luajit: any way to make array initialization zero-based?
- From: Geoff Leyland <geoff_leyland@...>
- Date: Thu, 14 Jun 2012 11:29:40 +1200
On 14/06/2012, at 11:24 AM, Chris wrote:
> I have tried the offset by one method but again run into issues with
> the confusing nature of it. If an end user has to make a native call
> (eg. OpenGL) they have to remember to offset the data which is
> unexpected. A solution is to wrap all external API calls, but again:
> performance hit when making lots of calls.
Have you checked that? I would hope that LJ would effectively inline the wrapper. Ideally there's only the (smaller) performance hit of the add. (I'm not saying it's the best solution in the world, just curious)