4 ms·
I wonder why they didn't go with LLVM IR, both WebKit and LLVM are essentially Apple products now.
by wereHamster 11y ago
I wonder why they didn't go with LLVM IR, both WebKit and LLVM are essentially Apple products now.
- chrisseaton 11y agoThere is already an LLVM backend in WebKit. I think the whole intention of the Bare Bones Backend is that it isn't LLVM. I can't find the link now, but I believe there are some design documents behind this where they critique the performance and output of LLVM, so they're trying something new. LLVM does seem to struggle to support dynamic languages like JS well. For example Unladen Swallow (Python) and Rubinius (Ruby) were both commercially-backed efforts to use LLVM and neither achieved much performance.
- judofyr 11y agoMaybe you're thinking about this discussion? https://trac.webkit.org/wiki/b3Discussion2015 https://trac.webkit.org/wiki/b3Discussion2015
- gsnedders 11y ago> LLVM does seem to struggle to support dynamic languages like JS well. For example Unladen Swallow (Python) and Rubinius (Ruby) were both commercially-backed efforts to use LLVM and neither achieved much performance. FTL has had no problems with performance of LLVM generated code as far as I'm aware: the problem has been the performance of the compilation itself, and as I understand it, that is the motivating factor here.
- pcwalton 11y agoI can verify that LLVM ISel is quite slow. It's one of the main reasons why Rust is slower to compile than Go or OCaml. (NB: The output is very high quality, so I still think it's the right choice for AOT. But slow compilation kills JITs.)