Closed Bug 945972 Opened 11 years ago Closed 4 months ago

Parallel per-file JavaScript parsing for SpiderMonkey

Categories

(Core :: JavaScript Engine, defect)

defect

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: seth, Unassigned)

Details

I'd like to implement parallel per-file JavaScript parsing. By "per-file", I mean that we should get parallel speedup even when parsing a single file - this is distinct from (but builds upon) our current off-main-thread JavaScript parsing support.

In the past, I developed a working approach/algorithm intended to be used to parallelize existing parsers without too much work, and a research implementation which parallelizes a bison-based JavaScript parser and is capable of ~3x speedup with 4 threads. I believe this number can be further improved upon with some extensions I haven't implemented yet. However, some significant questions remain:

(1) How will the results end up looking with a more efficient underlying parsing algorithm? It's generally much easier to parallelize slow sequential code, and the bison-based parser I was using is slower than SpiderMonkey's parser by a factor of 2-3x.

(2) Can issues which are not dealt with in the research implementation (for example, string interning) be overcome efficiently?

(3) How do things change when the parallel parsing is happening on a busy system with other types of work happening on other threads?

I'll be able to make a more detailed proposal once I've been able to take some time to investigate these issues further.

At this stage, what I've done is hacked together a proof-of-concept that shows that parallel parsing can work in SpiderMonkey. This implementation works, but is not optimized and sidesteps several issues with hacks. It's not in a position yet where I can get useful performance numbers out of it, but it has convinced me that this task is feasible and that my approach seems applicable to SpiderMonkey.

My plan, if all goes well, is to begin actively working on this in the early part of 2014.
Is this still on radar?

The bug assignee didn't login in Bugzilla in the last 7 months, so the assignee is being reset.

Assignee: seth.bugzilla → nobody
Severity: normal → S3
Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.