Repository navigation
Add constructor functions for {Symbol,Node}Links - #36845
Nathan Shively-Sanders (sandersn) merged 1 commit into
Conversation
0f253b2 to
ca20613
Compare
Nathan Shively-Sanders (sandersn)
left a comment
There was a problem hiding this comment.
One question. Ron Buckton (@rbuckton) or Andrew Casey (@amcasey) are actually the ones who should review this change.
|
TypeScript Bot (@typescript-bot) perf test this |
|
Heya Nathan Shively-Sanders (@sandersn), I've started to run the perf test suite on this PR at ca20613. You can monitor the build here. Update: The results are in! |
|
Nathan Shively-Sanders (@sandersn) Here they are:Comparison Report - master..36845
System
Hosts
Scenarios
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
side question: where is the code/repo for the benchmark suite? |
Using a constructor function like this can help node better optimize object allocation. This improves memory usage when compiling `src/compiler` from **277M** to **270M**, a nice ~3% win.
ca20613 to
434043e
Compare
|
BTW, I have blogged about how I discovered this, and what I think some further action might be: |
|
In JS, you can annotate ES5‑style constructor functions with Though I don’t know how you’d tell TypeScript that it implements an interface. |
Using a constructor function like this can help node better optimize
object allocation. This improves memory usage when compiling
src/compilerfrom 277M to 270M, a nice ~3% win.Inspired by #33431, looking how far I can take this.