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

feat(date-format): added more tests cases #20

Merged

Conversation

H4ad
Copy link
Collaborator

@H4ad H4ad commented Jan 7, 2023

I found some performance improvements to nestjs/nest#10823, and one of the improvements I found was that the toLocaleDateString function with locale options is much slower than Intl.DateTimeFormat passing the same arguments.

So I added the same options I see in NestJS with the comparison to Intl.DateTimeFormat creating new instances and reusing the same instance.

I don't know if I'm comparing apple to oranges but I think that worth to know the difference.

Also, for some reason, in that Pull Request I found a difference performance from 1ms to 13ms switching NodeJS version, I tried to isolate the issue but I didn't find any reason that could indicate that NodeJS was the problem, so I think that running inside this tests could bring more light to that problem.

bench/date-format.js Outdated Show resolved Hide resolved
@H4ad H4ad force-pushed the feat/more-benchmark-for-date-format branch from bef059e to 11290b0 Compare January 7, 2023 17:06
bench/date-format.js Outdated Show resolved Hide resolved
@H4ad H4ad force-pushed the feat/more-benchmark-for-date-format branch from 11290b0 to 04f6a85 Compare January 7, 2023 17:07
@RafaelGSS RafaelGSS merged commit a9d2eca into RafaelGSS:main Jan 7, 2023
@H4ad H4ad deleted the feat/more-benchmark-for-date-format branch January 7, 2023 17:12
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.

None yet

2 participants