Re: Probably a bug in LuaJIT x86

  • From: "szbnwer@xxxxxxxxx" <szbnwer@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Fri, 17 Aug 2018 13:50:02 +0000

hi there! :)

Il giorno ven 17 ago 2018 alle ore 05:17 Egor Skriptunoff
<egor.skriptunoff@xxxxxxxxx> ha scritto:
[,,,]

so that LuaJIT would not create intermediate double datatype?
All I want is standard int32 arithmetics with usual wraparound addition.
[...]
Is there exist more fast and more compact way to perform int32 arithmetics in 
LuaJIT?

this is an interesting problem domain, the best i can think is to
write a c function for ffi, or a lua c function that can do whatever
you would like to have (depends on your need for supporting
operations, different platforms and int types; i think this is the
easiest choice); or i believe that anything can be achieved via bit
operations, but that can become a mindbender monster (cool), however
you can stay with pure lua :D ; or the 3rd way is to play with floats
in a restricted range, and juggle with your half empty floats. :D the
rest is benchmarking. such huge amount of pure fun! i think the best
way to start is to collect up architectural differences and marginal
numbers for test cases, and then you can jump in with test driven
development :)

bests, and have fun! :)

Other related posts: