Title: lib: optimize styleText when validateStream is false by RafaelGSS · Pull Request #61792 · nodejs/node · GitHub
Open Graph Title: lib: optimize styleText when validateStream is false by RafaelGSS · Pull Request #61792 · nodejs/node
X Title: lib: optimize styleText when validateStream is false by RafaelGSS · Pull Request #61792 · nodejs/node
Description: This commit optimizes the util.styleText when validateStream is false ➜ node2 git:(27ec4315b1f) ✗ node benchmark/compare.js --old ./node --new ./node-optimize --filter style-text util > style-text.out [00:00:30|% 100| 1/1 files | 60/60 runs | 24/24 configs]: Done % ➜ node2 git:(27ec4315b1f) ✗ node-benchmark-compare style-text.out confidence improvement accuracy (*) (**) (***) util/style-text.js n=1000 validateStream=0 format='invalid' messageType='boolean' 3.10 % ±9.95% ±13.24% ±17.23% util/style-text.js n=1000 validateStream=0 format='invalid' messageType='invalid' -8.84 % ±10.73% ±14.29% ±18.61% util/style-text.js n=1000 validateStream=0 format='invalid' messageType='number' -8.78 % ±9.00% ±12.00% ±15.67% util/style-text.js n=1000 validateStream=0 format='invalid' messageType='string' -9.09 % ±9.55% ±12.71% ±16.55% util/style-text.js n=1000 validateStream=0 format='italic' messageType='boolean' -4.34 % ±10.50% ±13.98% ±18.20% util/style-text.js n=1000 validateStream=0 format='italic' messageType='invalid' -0.16 % ±11.98% ±15.95% ±20.75% util/style-text.js n=1000 validateStream=0 format='italic' messageType='number' -4.44 % ±10.75% ±14.31% ±18.62% util/style-text.js n=1000 validateStream=0 format='italic' messageType='string' *** 572.71 % ±129.86% ±174.99% ±232.29% util/style-text.js n=1000 validateStream=0 format='red' messageType='boolean' 4.81 % ±11.07% ±14.73% ±19.17% util/style-text.js n=1000 validateStream=0 format='red' messageType='invalid' * 12.15 % ±10.44% ±13.91% ±18.14% util/style-text.js n=1000 validateStream=0 format='red' messageType='number' 4.98 % ±8.31% ±11.07% ±14.44% util/style-text.js n=1000 validateStream=0 format='red' messageType='string' *** 602.97 % ±124.23% ±167.42% ±222.24% util/style-text.js n=1000 validateStream=1 format='invalid' messageType='boolean' 1.49 % ±5.91% ±7.87% ±10.24% util/style-text.js n=1000 validateStream=1 format='invalid' messageType='invalid' -9.42 % ±9.62% ±12.82% ±16.73% util/style-text.js n=1000 validateStream=1 format='invalid' messageType='number' -4.64 % ±9.81% ±13.06% ±17.02% util/style-text.js n=1000 validateStream=1 format='invalid' messageType='string' 9.27 % ±10.24% ±13.65% ±17.83% util/style-text.js n=1000 validateStream=1 format='italic' messageType='boolean' 6.04 % ±9.99% ±13.30% ±17.34% util/style-text.js n=1000 validateStream=1 format='italic' messageType='invalid' -3.24 % ±9.79% ±13.04% ±16.98% util/style-text.js n=1000 validateStream=1 format='italic' messageType='number' -1.61 % ±9.45% ±12.58% ±16.38% util/style-text.js n=1000 validateStream=1 format='italic' messageType='string' 2.10 % ±9.03% ±12.05% ±15.74% util/style-text.js n=1000 validateStream=1 format='red' messageType='boolean' -0.12 % ±9.65% ±12.84% ±16.71% util/style-text.js n=1000 validateStream=1 format='red' messageType='invalid' -5.44 % ±11.00% ±14.64% ±19.07% util/style-text.js n=1000 validateStream=1 format='red' messageType='number' -1.35 % ±8.12% ±10.81% ±14.08% util/style-text.js n=1000 validateStream=1 format='red' messageType='string' * -7.68 % ±7.03% ±9.36% ±12.20% Be aware that when doing many comparisons the risk of a false-positive result increases. In this case, there are 24 comparisons, you can thus expect the following amount of false-positive results: 1.20 false positives, when considering a 5% risk acceptance (*, **, ***), 0.24 false positives, when considering a 1% risk acceptance (**, ***), 0.02 false positives, when considering a 0.1% risk acceptance (***) We are investigating how we can further optimise it without changing the API drastically.
Open Graph Description: This commit optimizes the util.styleText when validateStream is false ➜ node2 git:(27ec4315b1f) ✗ node benchmark/compare.js --old ./node --new ./node-optimize --filter style-text util > style-...
X Description: This commit optimizes the util.styleText when validateStream is false ➜ node2 git:(27ec4315b1f) ✗ node benchmark/compare.js --old ./node --new ./node-optimize --filter style-text util > st...
Opengraph URL: https://github.com/nodejs/node/pull/61792
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:2bb92b0b-ffc0-f82c-2bfe-82bbe913c97c |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 84AA:30A7B5:AA11D3:EDDFED:6A4CA049 |
| html-safe-nonce | bab8c776aa795e4f6684235317ec64ad07407aff8af5dfa16e04d560d2a6f530 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NEFBOjMwQTdCNTpBQTExRDM6RURERkVEOjZBNENBMDQ5IiwidmlzaXRvcl9pZCI6IjU0MDMzNzI3ODQ5MjIxNzM1MTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e65359401c1ff8f8333590dc34d4e612721225e0a5e250e9eca0026ff714540a |
| hovercard-subject-tag | pull_request:3277690701 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/nodejs/node/pull/61792/files |
| twitter:image | https://avatars.githubusercontent.com/u/26234614?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/26234614?s=400&v=4 |
| og:image:alt | This commit optimizes the util.styleText when validateStream is false ➜ node2 git:(27ec4315b1f) ✗ node benchmark/compare.js --old ./node --new ./node-optimize --filter style-text util > style-... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ae90d426644ca15e89bacceb72e51f4e9dbf85f7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width