Title: Bun executes code 7 times slower than Node · Issue #1421 · javascript-obfuscator/javascript-obfuscator · GitHub
Open Graph Title: Bun executes code 7 times slower than Node · Issue #1421 · javascript-obfuscator/javascript-obfuscator
X Title: Bun executes code 7 times slower than Node · Issue #1421 · javascript-obfuscator/javascript-obfuscator
Description: Hi, Continuing the topic "Code doesn't work in Bun [selfDefending=true]" #1404 Unfortunately, the problem is partially solved; the code in bunjs runs 7 times slower than in nodejs. Below is an example, first we save the code in the obfus...
Open Graph Description: Hi, Continuing the topic "Code doesn't work in Bun [selfDefending=true]" #1404 Unfortunately, the problem is partially solved; the code in bunjs runs 7 times slower than in nodejs. Below is an exam...
X Description: Hi, Continuing the topic "Code doesn't work in Bun [selfDefending=true]" #1404 Unfortunately, the problem is partially solved; the code in bunjs runs 7 times slower than in nodejs. Be...
Opengraph URL: https://github.com/javascript-obfuscator/javascript-obfuscator/issues/1421
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Bun executes code 7 times slower than Node","articleBody":"Hi,\nContinuing the topic \"Code doesn't work in Bun [selfDefending=true]\" https://github.com/javascript-obfuscator/javascript-obfuscator/issues/1404\n\nUnfortunately, the problem is partially solved; the code in bunjs runs 7 times slower than in nodejs.\nBelow is an example, first we save the code in the obfuscated.js file, then we run it first in nodejs, then in bunjs and compare the results.\n\n```\nconst fs=require('fs'), job=require('javascript-obfuscator');\nconst sourceCode=`function benchmark() {let count = 0;\n for (let i = 2; i \u003c 50000; i++) {let isPrime = true;\n for (let j = 2; j \u003c= Math.sqrt(i); j++) { if (i % j === 0) { isPrime = false; break; } }\n if (isPrime) count++;\n }\n}\nconsole.time('ExecutionTime'); benchmark(); console.timeEnd('ExecutionTime');`;\n\nconst opt={optionsPreset:'high-obfuscation',target:'node',disableConsoleOutput:false,stringArrayCallsTransformThreshold:1,splitStringsChunkLength:3}\nfs.writeFileSync('obfuscated.js', job.obfuscate(sourceCode,opt).getObfuscatedCode());\n```\nnode obfuscated.js - ExecutionTime: 1.270s\nbun obfuscated.js - [7.51s] ExecutionTime","author":{"url":"https://github.com/denyaalt","@type":"Person","name":"denyaalt"},"datePublished":"2026-06-21T19:47:21.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/1421/javascript-obfuscator/issues/1421"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:06c7e23d-438c-cc35-1455-fbd2cc6fe36a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E05E:262720:BA650A:1076800:6A638697 |
| html-safe-nonce | d95c73bdc0e8faf727c8a60ea899b5f00d7d5466f629901cd9ba1a00bcfd8ee3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMDVFOjI2MjcyMDpCQTY1MEE6MTA3NjgwMDo2QTYzODY5NyIsInZpc2l0b3JfaWQiOiIyODU3MDU5ODM5NjE2NzE0MzkxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 756a7f9afc01b91ef8f40142f9861ffc99f45015c7b34578f5fd2f23acde4c6c |
| hovercard-subject-tag | issue:4711751091 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/javascript-obfuscator/javascript-obfuscator/1421/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2a56018f6f55fa14adc521a34e4f173a80c8a5a3213facb1e5c2acb263f3e0ed/javascript-obfuscator/javascript-obfuscator/issues/1421 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2a56018f6f55fa14adc521a34e4f173a80c8a5a3213facb1e5c2acb263f3e0ed/javascript-obfuscator/javascript-obfuscator/issues/1421 |
| og:image:alt | Hi, Continuing the topic "Code doesn't work in Bun [selfDefending=true]" #1404 Unfortunately, the problem is partially solved; the code in bunjs runs 7 times slower than in nodejs. Below is an exam... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | denyaalt |
| hostname | github.com |
| expected-hostname | github.com |
| None | e4fb64aef87da454ec25b158147f7f5f14aef29216e5ca1612c2e48faa599d1f |
| turbo-cache-control | no-preview |
| go-import | github.com/javascript-obfuscator/javascript-obfuscator git https://github.com/javascript-obfuscator/javascript-obfuscator.git |
| octolytics-dimension-user_id | 23015672 |
| octolytics-dimension-user_login | javascript-obfuscator |
| octolytics-dimension-repository_id | 58360147 |
| octolytics-dimension-repository_nwo | javascript-obfuscator/javascript-obfuscator |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 58360147 |
| octolytics-dimension-repository_network_root_nwo | javascript-obfuscator/javascript-obfuscator |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e839936ba5faffb9c836dda1cf4729d50c88a32e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width