jk-jeon / dragonbox

Reference implementation of Dragonbox in C++
Apache License 2.0
607 stars 39 forks source link

Add Workflows to Ensure Portability? #20

Closed Alexhuszagh closed 3 years ago

Alexhuszagh commented 3 years ago

Currently, there seems to be no cross-compilation to ensure support for ARM, as well as OSes like Windows and macOS. It may be wise to add tests for ARM 32-bit and 64-bit, as well as a big-endian target (PowerPC64 could be a good example). Windows and macOS support are native to workflows, so it's a simple matter of adding configurations. There's a few available options to ensure quick cross-compilation for different:

Use Dockcross would be a drop-in replacement, while zig cc would only require a toolchain file for the configurations.

These would make sure the intrinsics, such as those in #11, are supported properly. If desired, I'd gladly submit a PR with the additional workflows. Would any other targets, such as MIPS64, or RISC-V be desired?

jk-jeon commented 3 years ago

@Alexhuszagh That sounds great!

To be honest, I do not eagerly aim to super-optimize this library for every relevant platform because that's simply out of my ability. After all, this repo is just a reference implementation of the algorithm, and I consider myself a researcher rather than a developer anyway; the main reason why performance of this library is important to me is because it is a proof that a very performant implementation of the algorithm is possible, but what I ultimately want is that my algorithm is adapted for other libraries and optimized by people with better skill than me. (Thank you so much for adapting Dragonbox to your wonderful library!) But anyway there is no reason not to have better support for other platforms if that does not add much complexity to the code.

Looking forward to your PR, thanks a lot!