Back

Oliver Medhurst

Porffor passes 50% of Test262

Test262 is the official ECMAScript conformance test suite; Porffor now passes 50% of it!

50%! ๐Ÿฅณ This is a huge milestone and I like to think shows the promising potential of Porffor. Truly AOT compiling of JS to Wasm/native has long been attempted and dismissed as infeasible, but this for the first time proves it can be possible in a new JS engine.

What does that mean?

Test262 is the official ECMAScript conformance test suite, it has almost 50k tests for every feature in the language, down to very niche details. Porffor now passes half of all of these! For a comparison: V8, JavaScriptCore, SpiderMonkey all pass around 88%; Hermes passes around 55%.

What is next?

A shifting of priorities. Porffor development will now not purely focus on conformance as it has been for the past ~year. Instead for now, it will be more like 50/50 between stability and performance with a temporary feature freeze. Stability is Porffor’s largest problem, as expected for an early unstable project. I would say this is the current main blocker of using Porffor in production (no longer conformance!).

A review of current Test262 results

You may have seen Porffor’s Test262 output before:

Screenshot of Porffor’s Test262 output

test262: 50.15% | ๐Ÿงช 48381 | ๐Ÿค  24261 | โŒ 6951 | ๐Ÿ’€ 15573 | ๐Ÿ—๏ธ 152 | ๐Ÿ’ฅ 331 | โฐ 135 | ๐Ÿ“ 978

But what do those emoji and numbers mean? Let’s break it down:

  • ๐Ÿงช 48381: The total number of tests.
  • ๐Ÿค  24261: Passes!
  • โŒ 6951: Failed gracefully (eg an assert failed).
  • ๐Ÿ’€ 15573: Runtime error (eg a TypeError was thrown).
  • ๐Ÿ—๏ธ 152: Malformed Wasm output from the compiler.
  • ๐Ÿ’ฅ 331: Compiler error.
  • โฐ 135: Timed out (took >10s).
  • ๐Ÿ“ 978: Hit a compiler todo error (eg bigint literal, import).

The good part is the very bad things (malformed Wasm and compiler errors) are very infrequent, now under 1%, showing the improvements in stability. The number of timeouts is not great, but there are some huge tests and the timeout limit is relatively short at 10s so I am not that concerned.

Progress over time

Graph of Porffor Test262 stats over time since inception

Thanks for reading! You can follow progress, message or email me in these places.