5 ms·
With projects like this competing against well known massive competitors (eg. the browser JS engines), not seeing their main competitors in a benchmark is a mas
by speps 10mo ago
With projects like this competing against well known massive competitors (eg. the browser JS engines), not seeing their main competitors in a benchmark is a massive red flag to me: https://boajs.dev/benchmarks https://boajs.dev/benchmarks
Not seeing V8, SpiderMonkey JavaScriptCore is very strange...
- mort96 10mo agoIt's not competing with V8, SpiderMonkey and JavaScriptCore.
- IshKebab 10mo agoWell, it is, because V8 is definitely an embeddable JS engine. For many people they might want to make a choice between V8 and Boa and for them the performance numbers are important information!
- mort96 10mo agoPeople who need an extremely high performance JavaScript engine, where the extra performance is worth using an engine that's hard to embed, has an unstable API, and an absolutely massive unwieldy Google-style C++ code base with all the pain that entails, plus a JIT and all the limitations that entails, JITed V8 is the right choice. People who just want to run JavaScript code where performance isn't such a big concern would prefer something like Boa (or the other engines listed on the comparison benchmark page). Both have their uses, and their use case is almost entirely non-overlapping. You wouldn't choose Boa for a competitive web browser engine or as the runtime for your back-end server software. You would consider it for a plug-in system, or maybe a game's scripting system.
- IshKebab 10mo agoWhat about people who want performance somewhere in the middle? There is clearly value in knowing the performance difference.
- mort96 10mo agoI'm not saying that there would be no value in having benchmarks which compare the JITless, easily embeddable JS interpreters against JITed, hard-to-embed browser-quality JS engines like V8 and SpiderMonkey. I'm just saying that those engines aren't really Boa's competitors, certainly not its "main competitors"; it's a different kind of thing that serves a different need.
- le-mark 10mo agoIs it though? V8 and spider monkey both have jits so performance numbers of the form “wow V8 is vastly faster than any of these other ones!” (similarly for sm). Does that really have any value?
- baq 10mo agoIt isn't, v8 will have anywhere between 2-1000x performance depending on the exact code it's jitting. Boa absolutely destroys v8 here though: use boa_engine::{Context, Source, JsResult}; fn main() -> JsResult<()> { let js_code = r#" let two = 1 + 1; let definitely_not_four = two + "2"; definitely_not_four "#; // Instantiate the execution context let mut context = Context::default(); // Parse the source code let result = context.eval(Source::from_bytes(js_code))?; println!("{}", result.display()); Ok(()) }
- echelon 10mo agoOh my god, that's so easy to embed. I have to check this out. This is awesome. You literally just sold me on it.
- IshKebab 10mo ago> anywhere between 2-1000x performance depending on the exact code it's jitting That is useful information! Benchmarks can show you this useful information.
- nekevss 10mo agoHuh, I just noticed thanks to this that the comment needs to be updated in the example lol it should probably say "Parse and evaluate the source code".
- 0cf8612b2e1e 10mo agoThis is offering a JS scripting layer in an otherwise Rust project. Performance is nice, but probably not a requirement.
- gr4vityWall 10mo agoIt's an embedded engine for scripting a bigger application. Its main "competitor" would be QuickJS. Though they aren't really competing on anything as far as I can tell, so maybe calling it a "similar project" is more fitting.
- vlovich123 10mo agoV8-jitless is in the benchmarks and even then still blows it away, as does quickjs.
- jitl 10mo agoBoth SpiderMonkey jitless (sm-jitless) and v8 jitless are on the benchmarks page, if you click the checkboxes you will see them in the graphs.
- ivankra 10mo ago> Not seeing V8, SpiderMonkey JavaScriptCore is very strange... They do compare with JIT-less V8 and SpiderMonkey there, just JSC is missing. I recently did my own benchmarking with a lot more engines, including other Rust engines: https://ivankra.github.io/javascript-zoo/?v8=true https://ivankra.github.io/javascript-zoo/?v8=true Personally, I'm more impressed with https://github.com/Hans-Halverson/brimstone https://github.com/Hans-Halverson/brimstone - it is faster, nearly just as full featured (almost full ES2025) and last but not least, a single person project.
- nekevss 10mo agoYeah! I found out about Brimstone just the other day! Its definitely interesting! One optimization that they have that Boa needs to implement is ropes for our string type :)