# Benchmark Perbandingan / Comparison Benchmark > **PromptJS v1.0.0 vs Framework & Compiler Lain** > > Metodologi: data diambil dari npm registry, Bundlephobia API, dan benchmark lokal. > Semua angka di bawah adalah **faktual dan terverifikasi** per 29 Juni 2026. > Sumber dicantumkan di setiap metrik. **Update:** PromptJS kini melewati audit > keamanan + 3 wave hardening (S-1..S-6, T-1), serta enrichment test suite **v5** > (880 test, branch coverage semantic-core dinaikkan, mutation score Stryker > dinaikkan dari baseline 49.72% โ†’ **63.91%** terverifikasi) โ€” semua tetap pada v1.0.0. --- ## ๐Ÿ“Š Perbandingan Output (Simple Counter App) Aplikasi counter sederhana: judul, tombol klik, tampilan jumlah. Dikompilasi/dibuild untuk production. | Framework | Output Size (min) | Compile Time | Runtime Deps | Mekanisme | |---|---|---|---|---| | **PromptJS** | **3.5 KB** โœ… | 9.8 ms | **0** | Compile โ†’ vanilla JS (no vDOM) | | **Svelte 5** | 3โ€“6 KB | ~20 ms | 0 | Compile โ†’ vanilla JS (no vDOM) | | **SolidJS** | 22 KB + app | ~5 ms | 3 (solid-js + web) | Fine-grained reactive, no vDOM | | **Alpine.js** | 45 KB + app | 0 (no compile) | 1 | Runtime reactive attributes | | **Vue 3** | 46 KB (gzip) + app | ~15 ms | 5 | Virtual DOM + compiler | | **React 19** | 42 KB (gzip) + app | ~50 ms (JSX) | 2 (react + react-dom) | Virtual DOM + JSX compiler | | **Pug** | 4โ€“8 KB | ~5 ms | 8 | Template โ†’ HTML string | | **Handlebars** | 70 KB (runtime) | ~3 ms | 4 | Runtime template interpolation | > **Sumber output size**: Bundlephobia API (26 Jun 2026) untuk runtime frameworks. > PromptJS & Svelte: diukur dari hasil build aplikasi counter yang identik. > Svelte 5 tidak memiliki runtime โ€” output tergantung ukuran komponen. --- ## ๐Ÿ“ฆ Dependency Footprint (npm install) | Framework | `node_modules` (install) | Production deps | Dev deps | |---|---|---|---| | **PromptJS** | **28 MB** | **0** โœ… | 7 (vitest, eslint, prettier, typescript) | | Svelte 5 | 32 MB | 16 | 18 | | SolidJS | 18 MB | 3 | 10 | | Alpine.js | 12 MB | 1 | 8 | | Vue 3 | 48 MB | 5 | 15 | | React 19 | 52 MB | 2 | 14 | | Pug | 36 MB | 8 | 9 | > **Sumber**: `npm install --production` diukur pada Node.js 22.16, Linux x64. > PromptJS: zero production dependencies โ€” hanya butuh Node.js runtime untuk kompilasi. --- ## ๐Ÿ”’ Keamanan & CSP | Framework | No `eval()` | No `new Function()` | CSP `'unsafe-inline'` free | CSP flag | Audit-hardened | |---|---|---|---|---|---| | **PromptJS** | โœ… | โœ… | โœ… (all `addEventListener`) | โœ… `--csp` built-in | โœ… **S-1..S-6 fixed** | | Svelte 5 | โœ… | โœ… | โœ… | โŒ manual | n/a | | SolidJS | โœ… | โœ… | โœ… | โŒ manual | n/a | | Alpine.js | โœ… | โœ… | โŒ (inline `x-on`) | โŒ manual | n/a | | Vue 3 | โœ… | โœ… | โœ… | โŒ manual | n/a | | React 19 | โœ… | โœ… | โœ… | โŒ manual | n/a | | Pug | โœ… | โœ… | โœ… | โŒ manual | n/a | > **Sumber**: Audit kode output compiler & runtime masing-masing framework. > PromptJS adalah satu-satunya yang menyediakan flag `--csp` bawaan untuk nonce injection. > Kolom **Audit-hardened**: PromptJS v1.0.0 telah menutup 3 temuan HIGH (code-injection > front-matter, sanitizer bypass, `html:` unsanitized) + 3 MEDIUM (atribut injection, > role-spoof, path-traversal), masing-masing dikunci regression test ber-PoC. --- ## ๐Ÿงฐ Sanitizer & Attribute Safety (post-hardening) | Vektor | Sebelum (audit) | Sesudah (v1.0.0 hardened) | |---|---|---| | `