Skip to content

refactor: use built-in wellformed operation #774

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

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

Conversation

climba03003
Copy link
Member

@climba03003 climba03003 commented Jun 11, 2025

From my local benchmark, it vary too large to conclude it has improvement or regression.

Checklist

@climba03003 climba03003 added the benchmark Label to run benchmark against PR and main branch label Jun 11, 2025
Copy link

PR:

short string............................................. x 24,298,246 ops/sec ±0.31% (193 runs sampled)
unsafe short string...................................... x 837,305,509 ops/sec ±0.10% (194 runs sampled)
short string with double quote........................... x 12,935,483 ops/sec ±0.98% (189 runs sampled)
long string without double quotes........................ x 10,421 ops/sec ±0.17% (193 runs sampled)
unsafe long string without double quotes................. x 836,880,191 ops/sec ±0.11% (194 runs sampled)
long string.............................................. x 10,378 ops/sec ±0.15% (194 runs sampled)
unsafe long string....................................... x 836,456,843 ops/sec ±0.12% (194 runs sampled)
number................................................... x 836,492,307 ops/sec ±0.07% (195 runs sampled)
integer.................................................. x 169,628,786 ops/sec ±0.07% (194 runs sampled)
formatted date-time...................................... x 1,917,810 ops/sec ±0.18% (192 runs sampled)
formatted date........................................... x 1,536,685 ops/sec ±0.27% (193 runs sampled)
formatted time........................................... x 1,536,111 ops/sec ±0.25% (190 runs sampled)
short array of numbers................................... x 78,345 ops/sec ±0.25% (193 runs sampled)
short array of integers.................................. x 74,924 ops/sec ±0.31% (193 runs sampled)
short array of short strings............................. x 19,646 ops/sec ±0.21% (192 runs sampled)
short array of long strings.............................. x 19,671 ops/sec ±0.27% (193 runs sampled)
short array of objects with properties of different types x 10,223 ops/sec ±0.29% (192 runs sampled)
object with number property.............................. x 832,014,686 ops/sec ±0.13% (194 runs sampled)
object with integer property............................. x 169,190,795 ops/sec ±0.09% (194 runs sampled)
object with short string property........................ x 24,424,523 ops/sec ±0.46% (192 runs sampled)
object with long string property......................... x 10,365 ops/sec ±0.15% (193 runs sampled)
object with properties of different types................ x 2,175,246 ops/sec ±0.28% (192 runs sampled)
simple object............................................ x 10,963,761 ops/sec ±0.54% (191 runs sampled)
simple object with required fields....................... x 10,733,221 ops/sec ±0.36% (191 runs sampled)
object with const string property........................ x 834,126,400 ops/sec ±0.09% (195 runs sampled)
object with const number property........................ x 835,264,759 ops/sec ±0.09% (193 runs sampled)
object with const bool property.......................... x 838,081,231 ops/sec ±0.10% (194 runs sampled)
object with const object property........................ x 838,001,357 ops/sec ±0.12% (193 runs sampled)
object with const null property.......................... x 838,954,956 ops/sec ±0.08% (194 runs sampled)

MAIN:

short string............................................. x 24,453,554 ops/sec ±0.58% (193 runs sampled)
unsafe short string...................................... x 834,223,077 ops/sec ±0.12% (195 runs sampled)
short string with double quote........................... x 13,074,151 ops/sec ±0.92% (188 runs sampled)
long string without double quotes........................ x 10,490 ops/sec ±0.15% (194 runs sampled)
unsafe long string without double quotes................. x 836,885,150 ops/sec ±0.13% (194 runs sampled)
long string.............................................. x 10,363 ops/sec ±0.17% (194 runs sampled)
unsafe long string....................................... x 839,876,570 ops/sec ±0.09% (193 runs sampled)
number................................................... x 836,385,915 ops/sec ±0.06% (195 runs sampled)
integer.................................................. x 169,932,358 ops/sec ±0.08% (194 runs sampled)
formatted date-time...................................... x 1,917,515 ops/sec ±0.22% (192 runs sampled)
formatted date........................................... x 1,539,718 ops/sec ±0.23% (192 runs sampled)
formatted time........................................... x 1,538,569 ops/sec ±0.28% (192 runs sampled)
short array of numbers................................... x 77,874 ops/sec ±0.23% (194 runs sampled)
short array of integers.................................. x 74,919 ops/sec ±0.24% (194 runs sampled)
short array of short strings............................. x 19,627 ops/sec ±0.23% (194 runs sampled)
short array of long strings.............................. x 19,567 ops/sec ±0.40% (194 runs sampled)
short array of objects with properties of different types x 10,147 ops/sec ±0.24% (192 runs sampled)
object with number property.............................. x 830,546,603 ops/sec ±0.11% (193 runs sampled)
object with integer property............................. x 169,635,710 ops/sec ±0.08% (195 runs sampled)
object with short string property........................ x 24,616,175 ops/sec ±0.20% (194 runs sampled)
object with long string property......................... x 10,394 ops/sec ±0.16% (193 runs sampled)
object with properties of different types................ x 2,178,729 ops/sec ±0.36% (192 runs sampled)
simple object............................................ x 10,309,481 ops/sec ±0.38% (193 runs sampled)
simple object with required fields....................... x 11,269,934 ops/sec ±0.30% (192 runs sampled)
object with const string property........................ x 840,400,406 ops/sec ±0.13% (194 runs sampled)
object with const number property........................ x 838,258,961 ops/sec ±0.04% (194 runs sampled)
object with const bool property.......................... x 842,191,670 ops/sec ±0.13% (194 runs sampled)
object with const object property........................ x 839,387,882 ops/sec ±0.11% (195 runs sampled)
object with const null property.......................... x 840,437,812 ops/sec ±0.10% (194 runs sampled)

@github-actions github-actions bot removed the benchmark Label to run benchmark against PR and main branch label Jun 11, 2025
@climba03003
Copy link
Member Author

The benchmark shows there is a regression on non-affected code routine.
For my local environment, it show the similar conclusion but improvement on the string.

Can anyone confirm the same result on node@24? (Github Actions using node@22)

@Uzlopak
Copy link
Contributor

Uzlopak commented Jun 11, 2025

@KhafraDev fyi

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

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

Successfully merging this pull request may close these issues.

3 participants