-
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test GraalVM / TRegex #16
Comments
Either someone will need to contribute this, or there will need to be far more detailed instructions on how to setup a project and run it with GraalVM/TRegex. The README has scant mention of this. It says something about using it "Truffle's interop mechanisms." But that means nothing to me. Also:
Unless they're doing powerset construction lazily, their regex compile times will have worst case exponential time in the size of the regex pattern. |
i've tried to make some example, but as you've said, the documentation is totally insufficient for quick experiments, so i think i'll give up on using tregex directly. ...but there's another clue in that (overall very unsatisfactory) docs:
maybe running tregex through graaljs would be a sensible option? graalvm offers (some degree of) node.js compatibility: https://github.com/oracle/graaljs?tab=readme-ov-file#nodejs-support . i'll try to experiment with that. |
ok, running graaljs in node.js compatibility mode looks simple. i hope it will be easy enough for you to include it in your benchmarks. what you need is to download graalnodejs from https://github.com/oracle/graaljs/releases . there are many variants:
it seems that you don't need to download whole graalvm distribution or anything else than a single graalnodejs variant to be able to run node.js scripts (but i haven't tested that fully, just run the main.js from this repo with empty input json). graalnodejs is meant to be drop-in compatible with node.js, so it offers binaries with names 'node', 'npm', etc and that would clash with other node.js versions if you put everything on $PATH. my example invocations:
|
Thanks. I appreciate the leg work. I am still pretty unlikely to work on this any time soon personally. It would also be helpful to know who is using tregex. Like, is it being used anywhere in a consequential manner? Because it's a non-goal to include literally every regex engine in rebar. |
since tregex is a part of graaljs (and graalnodejs), i'll analyze situation with graaljs. i don't know how to measure whether graalvm-based node.js fork is being used frequently, but the javascript engine is probably already used in commercial scenarios. graalvm-based js engine is integrated with oracle database and with java applications. info about graaljs integration with oracle database:https://www.graalvm.org/js/mle-oracle-db/
https://labs.oracle.com/pls/apex/f?p=94065:12:32018698560791:15 info about graaljs integration with java applications:look at 'usages' column on https://mvnrepository.com/artifact/org.graalvm.js/js . the numbers in 'usages' column are clickable and will show you what other maven artifacts depend on particular version of graaljs engine. |
some docs on how to run tregex are here: https://github.com/oracle/graal/blob/master/regex/README.md
probably graalvm enterprise (aka oracle graalvm) will run faster than graalvm ce (community edition).
The text was updated successfully, but these errors were encountered: