You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, thank you for all the work you do on Graal JS and Graal itself, it's an awesome project 馃檪.
I authored of a series of blog posts that aim to be an introduction to working with Truffle and GraalVM. While working on the latest chapter on strings, I've ran into some interesting numbers for a simple benchmark.
The idea is to count to n in a loop, while using some simple string operations. The benchmark has two variants, one with direct property access:
The benchmark invokes the function with n equal to 1_000_000.
Here are the results on my laptop (ezs is the toy implementation developed in the article series, called EasyScript) - the units are microseconds per iteration, so lower is better:
Thank you for the report. There was really a simple optimization opportunity in our implementation of reads of the form primitiveValue[key]. I can see a comparable performance of countWhileCharAtDirectProp and countWhileCharAtIndexProp with d4442d6.
It hasn't made it into GraalVM 23.0.0 that we are about to release. So, it will be in GraalVM 23.1.0. You can use/test a development build in the meantime. The fix should appear there in a week or so.
First of all, thank you for all the work you do on Graal JS and Graal itself, it's an awesome project 馃檪.
I authored of a series of blog posts that aim to be an introduction to working with Truffle and GraalVM. While working on the latest chapter on strings, I've ran into some interesting numbers for a simple benchmark.
The idea is to count to
n
in a loop, while using some simple string operations. The benchmark has two variants, one with direct property access:And the other uses indexed property access:
The benchmark invokes the function with
n
equal to1_000_000
.Here are the results on my laptop (
ezs
is the toy implementation developed in the article series, called EasyScript) - the units are microseconds per iteration, so lower is better:So, the "index access" variant is 200 times slower than the "direct access" variant.
I thought you'd be interested in seeing this - I assume this is a simple bug in the implementation 馃檪.
The version of GraalVM used:
$ java -version openjdk version "17.0.5" 2022-10-18 OpenJDK Runtime Environment GraalVM CE 22.3.0 (build 17.0.5+8-jvmci-22.3-b08) OpenJDK 64-Bit Server VM GraalVM CE 22.3.0 (build 17.0.5+8-jvmci-22.3-b08, mixed mode, sharing)
And
org.graalvm.js:js
is in the same version (22.3.0
).Let me know if you have any questions!
Thanks,
Adam
The text was updated successfully, but these errors were encountered: