Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

How much speed up is expected from improvements? #2

Open
mavavilj opened this issue Jan 21, 2024 · 4 comments
Open

How much speed up is expected from improvements? #2

mavavilj opened this issue Jan 21, 2024 · 4 comments

Comments

@mavavilj
Copy link

How much speed up is expected from improvements?

I read the paper, and the V8 being noticeably faster makes this seem not ready for production.

However, in theory, AOT should certainly be faster than JIT, right?

@csgordon
Copy link
Contributor

This is a complicated question. It is not generally true (e.g., across languages) that AOT should always be faster than a JIT, as there are additional optimizations available to JITs (from profiling data) that are not available AOT (even with profile guided optimization, since application profiles can change across inputs).

The paper was mostly focused on how to do AOT compilation at all for JavaScript (type inference), with the primary intended gains being reduced memory consumption (which we did well on). That said, we did believe there was room for improvement in performance, possibly beyond what JITs (at the time) were capable of, but the project dissolved for various reasons before that could be pursued (not for any technical reasons).

I would not recommend using this for production, not because of performance concerns (the reduced memory consumption could balance that out in some contexts), but because we never did conformance testing against test suites for the standard. Some of course would be ruled out by the type system, but we didn't get the chance to study the subset that should be permitted before the project dissolved. It would be viewed as a research project that was sinking for eventual production use, but didn't get there (which is what it is).

@mavavilj
Copy link
Author

mavavilj commented Jan 21, 2024

Okay.

I have been torn between focusing on TypeScript or contributing to this stump project. I do think that the way TypeScript does static types is not the correct way though, but more like a workaround after JavaScript. So if we wanted a statically typed JS, then SJS would be it.

@csgordon
Copy link
Contributor

You might find the following more recent projects of interest:

@mavavilj
Copy link
Author

mavavilj commented Jan 21, 2024

I do not understand why AOT should not outperform JIT, because AOT should have more data available.

This is not a core issue though, but the issue is that SJS is slower than V8.

OTOH, since those links mention STS by Microsoft, then possibly that project has more prospects for production.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants