Changing the basic type in Lua

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Changing the basic type in Lua

Kristoffer Danielsson
If I recall correctly, Lua uses floats to store numbers. There are patches that change this setting, so that int32 or int64 is used instead - possibly yielding a performance boost.
 
Would luabind work correctly if such a patch was applied?


Hitta inspiration till middagsmaten! MSN Mat & Dryck
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user
Reply | Threaded
Open this post in threaded view
|

Re: Changing the basic type in Lua

Nikolas Bowe
We use Asko's lnum patch to Lua with an older, slightly modified luabind.

Asko's patch allows lua to store ints and floats. We mainly use it to
reduce the size of lua values while maintaining integer range and float
support.
The only modification we made to Luabind for this was to make it use
lua_pushinteger in some of its primitive converters.

If you are just changing lua_Number (and not using lnum) then you should
be fine with an unmodified luabind.



Kristoffer Danielsson wrote:

> If I recall correctly, Lua uses floats to store numbers. There are
> patches that change this setting, so that int32 or int64 is used
> instead - possibly yielding a performance boost.
>  
> Would luabind work correctly if such a patch was applied?
>
> ------------------------------------------------------------------------
> Hitta inspiration till middagsmaten! MSN Mat & Dryck <http://mat.msn.se/>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> ------------------------------------------------------------------------
>
> _______________________________________________
> luabind-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/luabind-user
>  


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user