Open Pr0methean opened 10 months ago
I can add a feature that add kind = "static"
to the link
statements if this what you mean?
Can you try to add RUSTFLAGS='-L /usr/local/lib -l static=testu01'
to your cargo invocation ? This should do it.
I ultimately determined that for my use-case, I needed to rebuild TestU01 from source anyway, because LTO only works when TestU01 and the Rust code are compiled with the same version of clang. I also learned that the real cause of my performance issues was https://github.com/rust-lang/portable-simd/issues/11 (since my inner loop does 2 lookups in a [u64; 6]
).
At https://github.com/Pr0methean/ShiftStripe/actions/runs/7366198251/job/20048235812, the BigCrush runs would probably be much faster if the callbacks to the PRNG could be inlined, which would be possible through plugin LTO if TestU01 could be statically linked.