Haxe solution by Taylor Robinson
An implementation of a Prime Sieve in Haxe.
See: https://haxe.org/
Haxe is a programming language that while it does have it's own interpreter, can also be cross-compiled to other languages such as C++, Python, C# & more.
- Make sure you have a working Haxe installation.
- Make sure you have setup HaxeLib by typing
haxelib setup
- Make sure you have setup HaxeLib by typing
For simplicity, you can run the following commands from a bash shell to compile and run all implementations:
./compile.sh
./run.sh
haxe interp.hxml
haxe python.hxml
python3 bin/py.py
haxe cpp.hxml
- If you get a
Error: Library hxcpp is not installed
, runhaxelib install hxcpp
- If you get a
./bin/cpp/Main
My machine is a MacBook Pro 2020 (M1, 8GB RAM) running macOS Big Sur.
TayIorRobinson_Haxe_C++;2052;10.0021259784698;1;algorithm=base,faithful=yes
TayIorRobinson_Haxe_HaxeEval;49;10.1027731895446777;1;algorithm=base,faithful=yes
TayIorRobinson_Haxe_Python;26;10.114451885223389;1;algorithm=base,faithful=yes