Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: strip binary and optimize for size
This change adds stripping and optimization for size. As most operations in tm are waiting on IO and scanning file directories there is not a big difference between optimizing for performance compared to size. There were two different changes tested. - strip: Strip and perf opt - small: Strip and size opt hyperfine -w 10 "./tm-curr" "./tm-strip" "./tm-small" Benchmark 1: ./tm-curr Time (mean ± σ): 44.7 ms ± 1.6 ms [User: 56.8 ms, System: 159.5 ms] Range (min … max): 42.2 ms … 49.8 ms 47 runs Benchmark 2: ./tm-strip Time (mean ± σ): 44.0 ms ± 1.0 ms [User: 57.1 ms, System: 160.9 ms] Range (min … max): 41.3 ms … 46.4 ms 52 runs Benchmark 3: ./tm-small Time (mean ± σ): 45.5 ms ± 1.1 ms [User: 64.0 ms, System: 159.6 ms] Range (min … max): 43.3 ms … 48.4 ms 51 runs Summary './tm-strip' ran 1.02 ± 0.04 times faster than './tm-curr' 1.04 ± 0.04 times faster than './tm-small' From this I found that there was no real difference between the two but there was a difference in binary size. dua tm-* 1.92 MB tm-small 2.64 MB tm-strip 3.57 MB tm-curr The reduction in size is significant and was chosen over perf.
- Loading branch information