[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: LNUM patch: some experience on embedded projects?
- From: Andrew Cannon <ajc@...>
- Date: Wed, 11 Mar 2009 01:02:07 +0100
> we're developping on embedded devices without a FPU, and therefore use
> the "integral" variant of Lua, where numbers are all integers: working
> with floats when we have no hardware assistance is really too slow.
> However, it would be sometimes handy for us to be able to use floating
> point numbers, so we are therefore considering the LNUM patch, which
> lets mix different number formats in the same Lua VM.Has anyone
> experiences to recount on the use of this patch, with a significant
> codebase running on it, ideally in an embedded context?
we are using Xavante (Lua Web Server) in a camera project running on a Blackfin
CPU, which also has no FPU. In this case we needed to have floating point
support, otherwise Luasocket would not work (without ugly hacking) so I
installed the LNUM patch (double/int32) and it all works perfectly & _seamlessly_.
I downloaded a pre-patched Lua 5.1.3 tree (I guess there's one for 5.1.4 now),
reapplied my own patches and recompiled, et voilà! The integer performance
improvement is significant for minimal codesize increase, so I can unreservedly
...and since I normally only lurk on this list I'll take this opportunity to
thank Asko for the patch and the whole Lua team while I'm at it!
> -- Fabien.