Title: sqlite: use DictionaryTemplate for run() result by mertcanaltin · Pull Request #61432 · nodejs/node · GitHub
Open Graph Title: sqlite: use DictionaryTemplate for run() result by mertcanaltin · Pull Request #61432 · nodejs/node
X Title: sqlite: use DictionaryTemplate for run() result by mertcanaltin · Pull Request #61432 · nodejs/node
Description: Reduce allocation overhead in run() result object creation by caching DictionaryTemplate. Improves INSERT performance by ~17–24%, SELECT performance remains unchanged. results: ➜ node git:(mert/sqlite-optimize-run-result) ✗ node-benchmark-compare ./result.csv confidence improvement accuracy (*) (**) (***) sqlite/sqlite-is-transaction.js transaction='false' n=10000000 -5.98 % ±7.16% ±9.88% ±13.61% sqlite/sqlite-is-transaction.js transaction='true' n=10000000 0.13 % ±1.57% ±2.15% ±2.93% sqlite/sqlite-prepare-insert.js statement='INSERT INTO all_column_types (text_column, integer_column, real_column, blob_column) VALUES (?, ?, ?, ?)' n=100000 *** 17.24 % ±1.15% ±1.59% ±2.22% sqlite/sqlite-prepare-insert.js statement='INSERT INTO blob_column_type (blob_column) VALUES (?)' n=100000 *** 22.91 % ±1.25% ±1.71% ±2.33% sqlite/sqlite-prepare-insert.js statement='INSERT INTO integer_column_type (integer_column) VALUES (?)' n=100000 *** 23.71 % ±1.36% ±1.87% ±2.57% sqlite/sqlite-prepare-insert.js statement='INSERT INTO large_text (text_8kb_column) VALUES (?)' n=100000 -1.50 % ±6.67% ±9.29% ±12.99% sqlite/sqlite-prepare-insert.js statement='INSERT INTO missing_required_value (any_value, required_value) VALUES (?, ?)' n=100000 -1.17 % ±1.97% ±2.72% ±3.75% sqlite/sqlite-prepare-insert.js statement='INSERT INTO real_column_type (real_column) VALUES (?)' n=100000 *** 21.04 % ±1.43% ±2.01% ±2.84% sqlite/sqlite-prepare-insert.js statement='INSERT INTO text_column_type (text_column) VALUES (?)' n=100000 *** 19.58 % ±1.41% ±1.95% ±2.68% sqlite/sqlite-prepare-select-all.js statement='SELECT * FROM foo LIMIT 1' tableSeedSize=100000 n=100000 3.78 % ±9.61% ±13.77% ±20.18% sqlite/sqlite-prepare-select-all.js statement='SELECT * FROM foo LIMIT 100' tableSeedSize=100000 n=100000 -0.40 % ±1.60% ±2.20% ±3.00% sqlite/sqlite-prepare-select-all.js statement='SELECT 1' tableSeedSize=100000 n=100000 -1.97 % ±4.19% ±5.83% ±8.14% sqlite/sqlite-prepare-select-all.js statement='SELECT text_8kb_column FROM foo_large LIMIT 1' tableSeedSize=100000 n=100000 4.02 % ±8.16% ±11.59% ±16.73% sqlite/sqlite-prepare-select-all.js statement='SELECT text_8kb_column FROM foo_large LIMIT 100' tableSeedSize=100000 n=100000 1.32 % ±2.78% ±3.88% ±5.44% sqlite/sqlite-prepare-select-all.js statement='SELECT text_column FROM foo LIMIT 1' tableSeedSize=100000 n=100000 ** -2.76 % ±1.66% ±2.29% ±3.16% sqlite/sqlite-prepare-select-all.js statement='SELECT text_column FROM foo LIMIT 100' tableSeedSize=100000 n=100000 0.59 % ±0.96% ±1.32% ±1.80% sqlite/sqlite-prepare-select-all.js statement='SELECT text_column, integer_column FROM foo LIMIT 1' tableSeedSize=100000 n=100000 * -2.37 % ±2.28% ±3.15% ±4.36% sqlite/sqlite-prepare-select-all.js statement='SELECT text_column, integer_column FROM foo LIMIT 100' tableSeedSize=100000 n=100000 0.71 % ±2.21% ±3.05% ±4.22% sqlite/sqlite-prepare-select-all.js statement='SELECT text_column, integer_column, real_column FROM foo LIMIT 1' tableSeedSize=100000 n=100000 -1.15 % ±2.02% ±2.77% ±3.79% sqlite/sqlite-prepare-select-all.js statement='SELECT text_column, integer_column, real_column FROM foo LIMIT 100' tableSeedSize=100000 n=100000 0.53 % ±1.93% ±2.72% ±3.87% sqlite/sqlite-prepare-select-all.js statement='SELECT text_column, integer_column, real_column, blob_column FROM foo LIMIT 1' tableSeedSize=100000 n=100000 ** 1.87 % ±1.31% ±1.80% ±2.45% sqlite/sqlite-prepare-select-all.js statement='SELECT text_column, integer_column, real_column, blob_column FROM foo LIMIT 100' tableSeedSize=100000 n=100000 1.26 % ±2.84% ±3.94% ±5.49% sqlite/sqlite-prepare-select-get.js statement='SELECT * FROM foo LIMIT 1' tableSeedSize=100000 n=100000 0.83 % ±1.37% ±1.88% ±2.56% sqlite/sqlite-prepare-select-get.js statement='SELECT 1' tableSeedSize=100000 n=100000 -0.22 % ±1.32% ±1.83% ±2.54% sqlite/sqlite-prepare-select-get.js statement='SELECT text_8kb_column FROM foo_large LIMIT 1' tableSeedSize=100000 n=100000 * 1.40 % ±1.04% ±1.42% ±1.93% sqlite/sqlite-prepare-select-get.js statement='SELECT text_column FROM foo LIMIT 1' tableSeedSize=100000 n=100000 1.17 % ±1.71% ±2.36% ±3.25% sqlite/sqlite-prepare-select-get.js statement='SELECT text_column, integer_column FROM foo LIMIT 1' tableSeedSize=100000 n=100000 -5.25 % ±10.77% ±15.42% ±22.57% sqlite/sqlite-prepare-select-get.js statement='SELECT text_column, integer_column, real_column FROM foo LIMIT 1' tableSeedSize=100000 n=100000 0.18 % ±1.46% ±2.01% ±2.74% sqlite/sqlite-prepare-select-get.js statement='SELECT text_column, integer_column, real_column, blob_column FROM foo LIMIT 1' tableSeedSize=100000 n=100000 0.49 % ±1.81% ±2.51% ±3.48% Be aware that when doing many comparisons the risk of a false-positive result increases. In this case, there are 29 comparisons, you can thus expect the following amount of false-positive results: 1.45 false positives, when considering a 5% risk acceptance (*, **, ***), 0.29 false positives, when considering a 1% risk acceptance (**, ***), 0.03 false positives, when considering a 0.1% risk acceptance (***) ➜ node git:(mert/sqlite-optimize-run-result) ✗
Open Graph Description: Reduce allocation overhead in run() result object creation by caching DictionaryTemplate. Improves INSERT performance by ~17–24%, SELECT performance remains unchanged. results: ➜ node git:(mert/sq...
X Description: Reduce allocation overhead in run() result object creation by caching DictionaryTemplate. Improves INSERT performance by ~17–24%, SELECT performance remains unchanged. results: ➜ node git:(mert/sq...
Opengraph URL: https://github.com/nodejs/node/pull/61432
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:808c48e5-2b2a-796d-3e06-cbdef3a6fd97 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B9E6:223EF0:171188D:215B8B4:6A4CECE7 |
| html-safe-nonce | c150e956af03d24574ff1d4b2d6b5466c9b99608fedf49baec200db56f13100b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOUU2OjIyM0VGMDoxNzExODhEOjIxNUI4QjQ6NkE0Q0VDRTciLCJ2aXNpdG9yX2lkIjoiNDk0NDU1NjIxMTk2Nzk0NTk1OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a89b91275cdc851e8b53d96cf42a5902848965e19ec5415ce9fa1bfdf6808393 |
| hovercard-subject-tag | pull_request:3185599555 |
| 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/61432/files |
| twitter:image | https://avatars.githubusercontent.com/u/37827216?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/37827216?s=400&v=4 |
| og:image:alt | Reduce allocation overhead in run() result object creation by caching DictionaryTemplate. Improves INSERT performance by ~17–24%, SELECT performance remains unchanged. results: ➜ node git:(mert/sq... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 299b43bca6e02ad35197ffeba30d2466846d5fb02ab96fbced5b5e6cec589fb8 |
| 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 | efec6750a5afcaeaf5dfcf629f404cf98c8371e3 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width