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

Add FFI bindings for some of the C++ standard library bit operations (from the Numerics library) #514

Merged
merged 4 commits into from
Feb 20, 2024

Conversation

rdw-software
Copy link
Member

These seem to be much faster than Lua versions, resulting in a 10x speedup in the micro-benchmark (and ~5% in real code).

@rdw-software rdw-software force-pushed the cpp-ffi-bitops branch 2 times, most recently from fc38c32 to d78053b Compare February 20, 2024 01:12
These seem to be about 10 times as fast as a Lua implementation (jn microbenchmarks), amounting to a 5% performance increase in some of the code I've been running.
It seems that the return type was changed retroactively, which isn't reflected in the GCC and clang versions installed on GitHub's runners? Either way, just dereferencing the function itself won't compile in that environment.

It might be sensible to upgrade the installed toolchain in the CI runner, but that'll increase build times even more.  It's prudent to test that the build proceeds with "older" versions of the supported toolchains anyway, as well as the relatively recent ones used by MSYS on Windows (which seems to have no issue here).
@rdw-software rdw-software merged commit dec4c81 into main Feb 20, 2024
11 checks passed
@rdw-software rdw-software deleted the cpp-ffi-bitops branch February 20, 2024 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant