Closed
Description
We are experiencing very long compile times for our crates when using rustler
with --release
mode. It appears that the compile time does scale superlinearly with the number of fields when using derives such as NifStruct
. I implemented an example here. For the benchmark, I created some simple crates which contain only one struct using NifStruct
and a number of simple fields.
Example run:
~/tools/rusty/native/benchmark_compile(master ✗) ./benchmark.sh
number_of_fields time
0 0.03
1 0.24
2 0.27
4 0.54
8 1.76
16 9.11
32 60.81
48 156.27
64 407.51
~/tools/rusty/native/benchmark_compile(master ✗) ./plot.gpi
For comparision, here are the results when using the debug mode:
As expected, the compile time is much faster. It also appears to be more linear than with release mode. I suspect that we somehow make the life of LLVM harder w.r.t. the generated code.
Metadata
Metadata
Assignees
Labels
No labels