go-randomx/README.md
DataHoarder aab8f99dd4
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
Include softfloat64 and allow for purego implementation
2024-04-17 06:04:29 +02:00

1.8 KiB

RandomX (Golang Implementation)

Fork from git.dero.io/DERO_Foundation/RandomX. Also related, their Analysis of RandomX writeup.

Original code failed RandomX testcases and was implemented using big.Float.

This package implements RandomX without CGO, using only Golang code, pure float64 ops and two small assembly sections to implement CFROUND modes, with optional soft float implementation.

All test cases pass properly.

Uses minimal Go assembly due to having to set rounding mode natively. Native hard float can be added with supporting rounding mode under asm.

JIT is supported on a few platforms but can be hard-disabled via the disable_jit build flag, or at runtime.

A pure Golang implementation can be used on platforms without hard float support or via the purego build flag manually.

Platform Supported Hard Float SuperScalar JIT Notes
386
amd64 * JIT only on Unix
arm *
arm64
mips *
mips64 *
riscv64 *
wasm *

* these platforms only support software floating point / purego and will not be performant.