3 ms·
This sample code took 12 minutes on a clean build on my travel netbook, now dead. https://github.com/pjmlp/gwc-rs https://github.com/pjmlp/gwc-rs Maybe nowada
by pjmlp 1y ago
This sample code took 12 minutes on a clean build on my travel netbook, now dead.
https://github.com/pjmlp/gwc-rs https://github.com/pjmlp/gwc-rs
Maybe nowadays it is faster, I have not bothered since I made the RIR exercise.
Get the community editions of Delphi, FreePascal, or D and see what a fast build means.
Better yet, take the lastest version of Turbo Pascal for MS-DOS, meaning 7, and try it out on FreeDOS.
- littlestymaar 1y ago> This sample code took 12 minutes on a clean build on my travel netbook, now dead. Clean builds are slow indeed. But they are also once every six week at most if switch to the latest compiler at every release. > Get the community editions of Delphi, FreePascal, or D and see what a fast build means. Honestly, who cares about the difference between 1s vs 100ms vs 10ms for a build though? Rust compilation isn't optimal by any means, and it wouldn't have been workable at all in the 90s, but computers are so fast today (even 13-years old computers) it rarely matters in practice IMHO.
- alain_gilbert 1y ago> Honestly, who cares about the difference between 1s vs 100ms vs 10ms for a build though? I definitely do. Not necessarily because of the 10ms vs 1s. But because of the later stage when it becomes 600ms vs 60s.
- littlestymaar 1y ago> But because of the later stage when it becomes 600ms vs 60s. What later stage though, as I said I worked with big code bases on old hardware without issues. I'm simply not convinced that there exist a situation where incremental rebuild of the crate you're working on is going to take 60s, at all, especially if you're using hardware from this decade.
- alain_gilbert 1y agoI have a fairly small go project (100k loc) and it takes ~30sec to build. I'd be thrilled to have it build in 300ms. (Using a macbook pro 2019)
- littlestymaar 1y ago> I have a fairly small go project (100k loc) and it takes ~30sec to build. Wait, aren't Go builds supposed to be fast?
- nicoburns 1y agoConsider upgrading your hardware if/when you get a chance to (obviously this is expensive). My builds (Rust not Go, but it might well be similar?) got 10x faster when I upgraded from a 2015 MBP to an M1. I suspect 2019 to M4 might be similar.
- lenkite 1y agoThat's strange. Humongous k8s Go projects (>500k LOC) build in a third of that time. Do you have lots of deps in your `go.mod` ? Is the project abusing codegen ?
- alain_gilbert 1y ago61 dependencies, no codegen. Nothing special really.
- Orygin 1y agoOn a Macbook M2 Pro, on a project with loads of services, 210k loc, a full rebuild takes 70 seconds. Incremental takes 36s. For one service, full rebuild in 16s and incremental 0.6s. It's not blazing fast but considering the scale of the project, it's not that bad, especially since I rarely rebuild every service at the same time.
- yencabulator 1y agoAre you using CGo? C compilation slowness doesn't count.
- pjmlp 1y agoRoc team does, that was one of the reasons they dropped Rust for Zig, even though Zig is yet to reach 1.0. As do many of us, as we know how fast builds can be with complex languages, e.g. add OCaml to the list of faster than Rust compiler toolchains, while having a ML type system.
- veber-alex 1y ago> This sample code took 12 minutes on a clean build on my travel netbook, now dead. > Maybe nowadays it is faster, I have not bothered since I made the RIR exercise. Took me 18 seconds on a M4 Pro. Please stop spreading FUD about Rust. Compile times are much better now then what they were and are constantly improving. Maybe it will never be as fast as one of those old languages that you like that nobody uses anymore but it's plenty usable.
- pjmlp 1y agoDo you have M4 Pros to offer everyone using Rust? I would gladly take one. And the Roc team as well, maybe they would revert back their decision on moving away from Rust to Zig due to compile times.
- veber-alex 1y ago> Do you have M4 Pros to offer everyone using Rust? > I would gladly take one. Do you have 10 year old netbooks to give to everyone? because this seems to be required to have slow compile times in Rust. > And the Roc team as well, maybe they would revert back their decision on moving away from Rust to Zig due to compile times. More cherry picked examples, you sure love those. Like whats the point of bringing this up? Do you want me to show you the thousands of software projects that do use rust as a counter example? Obviously no programming language is one size fits all.
- pjmlp 1y ago> Do you have 10 year old netbooks to give to everyone? because this seems to be required to have slow compile times in Rust. Unfortunately not all of us have an economical situation that allow us to sponsor Trump gifts every couple of years. How many of those thousands of software projects that do use Rust, can be show as counter example to slow compilation times on hardware that common people usually buy and keep around? Especially in those countries that are outside tier 1 in world economy, getting computers from whatever parts western no longer considers usable for their daily tasks. Maybe they can afford to wait.
- 1y ago
- bakul 1y agoThe default serial build of V (tcc backend) takes 0.6 (with production compiler) to 1.3 seconds (with tcc backend compiler). The production (clang backend) parallel build of V language takes about 3.2 seconds. All on an m1 mac. Even the go compiler seems slow in comparison.