haxe icon indicating copy to clipboard operation
haxe copied to clipboard

BigInt is slow on most targets (or at least tests are)

Open kLabz opened this issue 5 months ago • 3 comments

See #12309

The overhead is not negligible, with total CI times being multiplied by 3-4 on some targets. There are a lot of tests involved, but seeing how hl and jvm are still fine with it, it should be possible to have them run in a decent amount of time on other targets as well.

kLabz avatar Jul 08 '25 09:07 kLabz

What are the acceptable times for the tests?

Here are the latest times :

  1. With BigInt tests included [57m 12s] https://github.com/flashultra/haxe/actions/runs/16222217009
  2. Without BigInt tests [30m 7s] https://github.com/flashultra/haxe/actions/runs/16225820364

The slowest tests are :
mac-test (lua) 30m 6s vs 6m 37s mac-test (cpp) 43m 15s vs 21m 3s

flashultra avatar Jul 11 '25 19:07 flashultra

For the BigInt test there are three steps, here is a comparison of the results for Linux vs Mac (cpp)

First step: (Linux cpp ) execution time: 9.927 seconds vs (Mac cpp ) execution time: 17.415 seconds

Second step : (Linux cpp ) execution time: 84.258 seconds vs (Mac cpp ) execution time: 138.411 seconds

Third step: (Linux cpp ) execution time: 12.346 seconds vs (Mac cpp ) execution time: 14.479 seconds

There is not a big differences in executuion time , but Mac cpp takes 34m 29s , and Linux is 10m 49s (without bigInt test results are Mac cpp - 16m 56s , Lunux cpp - 8m 29s So the problem is probably in the compile time, which I'm not sure how to optimize.

About Lua test , Linux use Lua 5.1 and I think Mac use Lua 5.2 (not sure if this matter at all) Linux lua BigInt tests takes 19m 8s Mac Lua - 29m 37s without BigInt is: Linux Lua 4m 35s Mac Lua - 7m 54s

Maybe it can be optimized, I don't know how. It's probably best to stop the Lua tests?

flashultra avatar Jul 12 '25 13:07 flashultra

I've disabled the BigInt tests on eval today because tests runtime went from 0.3 seconds to 50+ seconds on my machine. I haven't identified the actual cause yet.

Simn avatar Nov 24 '25 10:11 Simn