5 ms·
I ran `cargo fetch` first to remove the downloading time out of the equation. Ran on arch (AMD R7 7800X3D). First build: > cargo build 2574.91s user 79.89s
by pytness 2y ago
I ran `cargo fetch` first to remove the downloading time out of the equation.
Ran on arch (AMD R7 7800X3D).
First build:
> cargo build 2574.91s user 79.89s system 1341% cpu 3:17.84 total
After change:
> cargo build 11.97s user 1.62s system 176% cpu 7.719 total
After another change, this time with --timings:
> cargo build --timings 12.00s user 1.60s system 176% cpu 7.722 total
Unit | Total | Codegen
1. veloren-server v0.16.0 4.9s 3.7s (75%)
2. veloren-voxygen v0.16.0 4.1s 2.0s (49%)
...
- Ygg2 2y agoI have 5900X, and I got like 4m34s build time on Windows (which should be slower). What memory are you using? Are you overclocking? Are you using SSD?
- pytness 2y agoI directly cloned to /tmp. 64GB ddr5, No overclock. edit: (also, the machine was recently rebooted and had very few processes running) After i posted the comment i tested on a laptop running windows with wsl (i7-12850HX 16c 24t) and the first build was going above 8 minutes.
- Ygg2 2y agoSo is /tmp a ramdisk? I have 64GB DDR4, but overclocked to double Infinity Fabric timings i.e. 3600 Mhz (it might be different for DDR5/ Zen4-5). I ran this on MSVC toolchain on windows. With like 43% memory taken by various Firefoxe and IntelliJ windows. Either compilers REALLY love CORES, or the Memory speed is causing issue :/ EDIT: Windows compilation 8min took less time than Linux 45min?
- pytness 2y agoYes, in linux there is a file system type called tmpfs which is mapped to memory (most of the time iirc). > Filesystem Size Used Avail Use% Mounted on > tmpfs 31G 22M 31G 1% /tmp Try running `cargo build --timings`, it creates a report about build times. My guess would be storage speed, i would not expect memory speed to be that much of an issue. edit: > Windows compilation 8min took less time than Linux 45min? I dont think i understood this correctly, but in the case you are asking (for clarification) about my compile times, i got around 3m:18s on linux, and around >8 minutes on WSL.
- Ygg2 2y ago> Try running `cargo build --timings`, it creates a report about build time Yeah, I got a bit longer time now, after `cargo clean `. Here are the timings: https://html-preview.github.io/?url=https://gist.githubusercontent.com/Ygg01/fb97a709b9bb88dfaaf428b8c111635e/raw/f4ffbc47a9cf16c421a0493732cf89128ffe5d99/veloren-win-perf-shot.html https://html-preview.github.io/?url=https://gist.githubuserc... It's still strange win 10 was faster to compile on a worse CPU and worse memory :/ Maybe WSL has some issues that MSVC toolchain doesn't. > I dont think i understood this correctly, but in the case you are asking (for clarification) about my compile times Yes. I was confused by its output, i.e. 2541.91s
- pytness 2y ago> Yes. I was confused by its output, i.e. 2541.91s Thats the output of the shell command `time` (im using zsh so the output differs from other shells) eg `time cargo build`. system is the cpu time spent calling kernel functions and user is the cpu time spent outside kernel functions. The time is measured per core, so if the program runs for 2 seconds with 16 threads, the user time would be around 32. Notice there is a cpu metric (1341% cpu), if you do: (user + system) / cpu * 100 / 60 = ~3.29 minutes = 3m:17s