Open Bug 1804964 Opened 1 year ago Updated 11 months ago

Experiment using CanGC allocations directly for JSDependentString::new_

Categories

(Core :: JavaScript Engine, task, P2)

task

Tracking

()

People

(Reporter: tcampbell, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [sp3])

When I remove this in JSDependentString::new_ I see 5% improves for a simple String.substring microbenchmark. This is higher than I expected and I wonder if there are more cases where we are better off just doing the rooting in the first place.

let lefty  = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
let result = [0, 1, 2, 3, 4, 5, 6, 7];

let start = Date.now();
for (var i = 0; i < 50000000; ++i) {
	result[i & 8] = lefty.substring(20, 28);
}
let end = Date.now();

console.log(end - start);

Needs further experimentation on larger benchmarks

Severity: -- → N/A
Priority: -- → P2
Whiteboard: [sp3]
Assignee: tcampbell → nobody
You need to log in before you can comment on or make changes to this bug.