Not seeing V8, SpiderMonkey JavaScriptCore is very strange...
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
Personally, I'm more impressed with 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.
Though they aren't really competing on anything as far as I can tell, so maybe calling it a "similar project" is more fitting.
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.
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(())
}I have to check this out.
This is awesome. You literally just sold me on it.
That is useful information! Benchmarks can show you this useful information.