Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Perform packing/unpacking of arguments and results in HDL
Running three experiments with the old and the new code shows that avoiding packing/unpacking in Haskell yields a ~20-30% performance increase for longer running tests. Table below shows the minimum value for all runs. | Test | main (min) | branch (min) | faster | faster (>1s) | |----------------------------|------------|--------------|---------|--------------| | dyn_dispatch (debug) | 0.34 | 0.31 | 8.82% | | | ebreak_exception (debug) | 1.42 | 1.08 | 23.94% | 23.94% | | fpu_test (debug) | 3.42 | 2.4 | 29.82% | 29.82% | | hello_world (debug) | 0.47 | 0.38 | 19.15% | | | long_string (debug) | 4.97 | 3.37 | 32.19% | 32.19% | | loop_write (debug) | 9.7 | 6.64 | 31.55% | 31.55% | | many_calls (debug) | 0.93 | 0.74 | 20.43% | 20.43% | | print_a (debug) | 0.31 | 0.31 | 0.00% | | | print_b (debug) | 0.39 | 0.32 | 17.95% | | | print_numbers (debug) | 3.8 | 2.71 | 28.68% | 28.68% | | single_write (debug) | 0.82 | 0.6 | 26.83% | | | dyn_dispatch (release) | 0.2 | 0.24 | -20.00% | | | ebreak_exception (release) | 0.27 | 0.2 | 25.93% | | | fpu_test (release) | 0.71 | 0.5 | 29.58% | | | hello_world (release) | 0.2 | 0.19 | 5.00% | | | long_string (release) | 0.35 | 0.25 | 28.57% | | | loop_write (release) | 0.95 | 0.8 | 15.79% | | | many_calls (release) | 0.27 | 0.28 | -3.70% | | | print_a (release) | 0.19 | 0.23 | -21.05% | | | print_b (release) | 0.16 | 0.17 | -6.25% | | | print_numbers (release) | 0.49 | 0.43 | 12.24% | | | single_write (release) | 0.3 | 0.23 | 23.33% | | | JTAG | 33.33 | 25.89 | 22.32% | 22.32% | | JTAG chain | 126.67 | 89.85 | 29.07% | 29.07% | | | | | 15.84% | 27.25% | Figures are taken by observing clash-vexriscv-sim:unittests's times.
- Loading branch information