News for hackers. Stuff that matters.
Re:Why is Swift so slow (timeout) in compiling this code? by stephc_int13 on Tuesday May 30, 2023 @09:35AM (#36124714)
Compilation time for most modern languages (Rust, Zig, Swift) is, to say the least, not great.

I consider this a major hindrance for productivity.

Fast iteration/test cycle is the best way to stay in the flow while fixing small bugs on the go.

I'd say the limit for me is about five seconds, but I find it much better when I can keep it below one second.

I think that Jai is engineered to have fast compilation in debug mode, I hope that will be the case once released.

Re:Why is Swift so slow (timeout) in compiling this code? by bsaul on Tuesday May 30, 2023 @09:38AM (#36124756)
Zig is slow as well ??
Re:Why is Swift so slow (timeout) in compiling this code? by quic5 on Tuesday May 30, 2023 @09:43AM (#36124803)
The biggest bottleneck in Zig's case is LLVM. That's why they implement fast alternative backends for development. See: https://kristoff.it/blog/zig-new-relationship-llvm/
Re:Why is Swift so slow (timeout) in compiling this code? by bsaul on Tuesday May 30, 2023 @09:53AM (#36124926)
looks like the project's now abandonned :

https://github.com/ziglang/zig/projects/2

Re:Why is Swift so slow (timeout) in compiling this code? by hsn915 on Tuesday May 30, 2023 @10:16AM (#36125145)
This comment suggests otherwise:

https://github.com/ziglang/zig/issues/89#issuecomment-122118...

Although I'm not sure the "self hosted compiler" is the same as "llvm free backend".

Re:Why is Swift so slow (timeout) in compiling this code? by stefncb on Tuesday May 30, 2023 @11:16AM (#36125866)
It's not. The self-hosted compiler still uses llvm, and it's still slow because of it.
Re:Why is Swift so slow (timeout) in compiling this code? by TUSF on Tuesday May 30, 2023 @02:39PM (#36128736)
"self-hosted compiler" in this case means moving all the non-LLVM code (which was previously in C++) to Zig itself.
Re:Why is Swift so slow (timeout) in compiling this code? by Patrickmi on Wednesday May 31, 2023 @05:33AM (#36136339)
One thing I hate about LLVM is that once you get into the ecosystem to get “another alternative” or “abandon LLVM” it’s like hell, you get all these nice cool features then implementing a custom compiler for debugging can be much much harder than that
Re:Why is Swift so slow (timeout) in compiling this code? by mhd on Tuesday May 30, 2023 @11:08AM (#36125752)
I've got some bad experience with C++ for this. Yes, part of that was losing the flow, which is probably why way back then scripting languages were easier to sell than these days (where you can throw more money on the issue, with umpteen core dev machines).

But the other part was the reaction amongst developers to this. Layers of abstractions introduced just to please the compiler gods. C++ was particular famous for this, all for the sake of partial compilation still working -- sometimes this had the benefits of decoupling, but often it was a few cake layers on top of that.

So you end up with convenient languages, but have to forsake some of that convenience to actually be productive. But you still had to learn the convenient unused part and know the difference, even if you almost never could afford to use it (if it's just about runtime performance, you often don't need that. But you don't want to cause the projects compilation or test phase to double, just because that functional-combinatoric template metaprogramming approach is so much neater)

Oh man, if only we would have Wirth-dows, not Windows ;)

Re:Why is Swift so slow (timeout) in compiling this code? by fooker on Tuesday May 30, 2023 @01:29PM (#36127751)
C++ compile is pretty decent nowadays, except for template heavy dependencies like boost which attempt to be header only for the most part.
Re:Why is Swift so slow (timeout) in compiling this code? by jb1991 on Tuesday May 30, 2023 @02:31PM (#36128630)
I’ve been hearing about Jai for, what, maybe close to a decade already?! Is it actually gonna happen? I feel like it’s one of those languages that falls under the category of vaporware.
Re:Why is Swift so slow (timeout) in compiling this code? by duped on Tuesday May 30, 2023 @02:42PM (#36128797)
I don't think calling it Vaporware is accurate, since it's one person's project for their own other projects. There isn't (nor should there) be any expectation on general availability of it.
Re:Why is Swift so slow (timeout) in compiling this code? by stephc_int13 on Tuesday May 30, 2023 @03:00PM (#36129056)
I've been following the development of this language and I am pretty sure it is not vaporware.

I think they are making a PR mistake by not making it more open, but I would be surprised if it is never released.