Will Val take as long to compile as Rust? #730
-
The compiler for Val is written in Swift, does this affect compilation time significantly? What is the estimated compile time for Val based on the language design? |
Beta Was this translation helpful? Give feedback.
Replies: 0 comments 10 replies
-
Good questions.
I don't think having the compiler written in Swift instead of Rust makes a significant impact. Rust is a fast language, so it should have very little impact on the speed Rust compiler. Instead, I think the compilation times in Rust have everything to do with the language design. I don't know enough about Rust compiler to give an informed answer. I've heard Rust folks blaming LLVM, which would be an issue for Val too, but somehow I'm doubtful LLVM is the only culprit. Named lifetimes are probably hard to verify and it's possible they putting some heavy burden on the compiler. If I'm correct, then Val might have an edge because projections should be simpler to verify. But I'm only speculating.
It's very hard to say without having an implementation. For now, we have put little effort into optimization as our priority is to have a working version. Once we do, we'll start profiling. I'd be surprised if we can be competitive with Rust in the beginning; they've had a huge head start.
I'd like that very much, but that will probably take a while. Again, I don't see any reason this would give an edge to Val over Rust, though. I don't expect Val to significantly outperform Rust on most applications. |
Beta Was this translation helpful? Give feedback.
Good questions.
I don't think having the compiler written in Swift instead of Rust makes a significant impact. Rust is a fast language, so it should have very little impact on the speed Rust compiler. Instead, I think the compilation times in Rust have everything to do with the language design.
I don't know enough about Rust compiler to give an informed answer. I've heard Rust folks blaming LLVM, which would be an issue for Val too, but somehow I'm doubtful LLVM is the only culprit. Named lifetimes are probably hard to verify and it's possible they putting some heavy burden on the compiler. If I'm…