Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch Lua 5.3 off bit32 dependency #90

Closed
Tracked by #98
nvs opened this issue Jan 4, 2020 · 2 comments
Closed
Tracked by #98

Switch Lua 5.3 off bit32 dependency #90

nvs opened this issue Jan 4, 2020 · 2 comments
Labels
Milestone

Comments

@nvs
Copy link
Owner

nvs commented Jan 4, 2020

This would have it be required only for Lua 5.1, which is fine. The same functionality can be fulfilled using bitwise operators introduced in Lua 5.3. So the LUA_COMPAT_BITLIB compilation option would not matter. This would also provide better forwards compatibility with Lua 5.4.

Some quick testing shows that this won't really change performance in Lua 5.3. Perhaps ~1.5% slower for a fully compatible version of band. And roughly parity for a version that is simply A & B, and nothing else. I will think about this more once Lua 5.4 is released.

@nvs nvs added the task label Jan 4, 2020
@nvs
Copy link
Owner Author

nvs commented Dec 11, 2020

A bit of reading shows that Lua 5.3 without the compatibility library will still provide a bit32 library that returns false. In short, one would need to use the native bitwise operators for Lua 5.3+.

@nvs nvs mentioned this issue Jun 29, 2022
6 tasks
@nvs nvs added this to the 0.11 milestone Jun 29, 2022
@nvs
Copy link
Owner Author

nvs commented Jul 6, 2022

Testing shows that so long as the bit32 library is installed (e.g. via Luarocks), all will be well for Lua 5.3 compiled without LUA_COMPAT_BITLIB . Thus this is closed.

@nvs nvs closed this as not planned Won't fix, can't repro, duplicate, stale Jul 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant