News for hackers. Stuff that matters.
Re:Crystal Language That Aims at C Performance with Ruby Syn... by jariel on Friday April 02, 2021 @04:24PM (#26675556)
Rust has an 'excuse' for compile speed, in that, the compiler is ostensibly doing 'more work'.
Re:Crystal Language That Aims at C Performance with Ruby Syn... by Trasmatta on Friday April 02, 2021 @04:56PM (#26675901)
I'm not sure what you're implying by this, because the Crystal compiler is doing a lot of work as well. The global type inference is the primary reason for Crystal's compiler speeds, and it's why it's not likely to substantially improve. It's not slow for the sake of being slow.
Re:Crystal Language That Aims at C Performance with Ruby Syn... by jariel on Friday April 02, 2021 @05:03PM (#26675979)
Java does type inference in a number of places and javac is not slow.
Re:Crystal Language That Aims at C Performance with Ruby Syn... by Trasmatta on Sunday April 04, 2021 @12:21AM (#26686859)
Java doesn't do type inference at the level of Crystal. It's not the presence of type inference, it's the fact that almost everything in a Crystal program can be inferred.
Re:Crystal Language That Aims at C Performance with Ruby Syn... by linkdd on Friday April 02, 2021 @05:25PM (#26676165)
javac produces Java bytecode, not LLVM IR.

javac exists since at least 15 years, Crystal "only" 6 years.

Maybe things will get better with time?

Re:Crystal Language That Aims at C Performance with Ruby Syn... by edflsafoiewq on Friday April 02, 2021 @04:56PM (#26675903)
What work would that be?
Re:Crystal Language That Aims at C Performance with Ruby Syn... by jariel on Friday April 02, 2021 @05:01PM (#26675954)
? The borrow checker which is literally the reason Rust exists.
Re:Crystal Language That Aims at C Performance with Ruby Syn... by edflsafoiewq on Friday April 02, 2021 @05:06PM (#26676005)
Borrow checking is almost always very cheap, and lifetime are erased before codegen which is the really slow part.