Skip to content
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

lib: refactor to use more primordials in internal/freelist.js #36565

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Lxxyx
Copy link
Member

@Lxxyx Lxxyx commented Dec 18, 2020

Reference

The file is used here:

const FreeList = require('internal/freelist');

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

@mscdex
Copy link
Contributor

mscdex commented Dec 18, 2020

The benchmark CI regression is quite significant:

                          confidence improvement accuracy (*)   (**)  (***)
misc/freelist.js n=100000        ***    -73.53 %       ±1.13% ±1.52% ±2.01%

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Lxxyx
Copy link
Member Author

Lxxyx commented Dec 22, 2020

The benchmark CI regression is quite significant:

                          confidence improvement accuracy (*)   (**)  (***)
misc/freelist.js n=100000        ***    -73.53 %       ±1.13% ±1.52% ±2.01%

freelist is simple data structure, so refactoring to primordials causes a significant performance regression. I tried some solutions, but they didn't work. Do you all have any ideas about this issue? @aduh95

@ExE-Boss
Copy link
Contributor

I’m going to try implementing SafeArray.

@ExE-Boss
Copy link
Contributor

I’ve now opened #36600, which implements SafeArray.

@nodejs nodejs deleted a comment Dec 23, 2020
@nodejs nodejs deleted a comment Dec 23, 2020
@targos targos added the lib / src Issues and PRs related to general changes in the lib or src directory. label Dec 27, 2020
@aduh95 aduh95 added the needs-benchmark-ci PR that need a benchmark CI run. label Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lib / src Issues and PRs related to general changes in the lib or src directory. needs-benchmark-ci PR that need a benchmark CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants