PageSourceSearch

https://jenova-framework.github.io/docs/assets/js/45f0254b.08af88f9.js

js jenova-framework.github.io collected 2026-10-03 09:23:14 UTC 7,595 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkjenova_docs=self.webpackChunkjenova_docs||[]).push([[1465],{95613:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>c,default:()=>h,frontMatter:()=>a,metadata:()=>s,toc:()=>o});const s=JSON.parse('{"id":"Misc/Benchmark","title":"Benchmark","description":"This page provides performance benchmarks comparing Jenova C++, GDScript and .NET (C#) across various tasks.","source":"@site/pages/Misc/01-Benchmark.md","sourceDirName":"Misc","slug":"/Misc/Benchmark","permalink":"/docs/pages/Misc/Benchmark","draft":false,"unlisted":false,"tags":[],"version":"current","sidebarPosition":1,"frontMatter":{"hide_table_of_contents":false},"sidebar":"documentationSidebar","previous":{"title":"Misc","permalink":"/docs/pages/category/misc"},"next":{"title":"Auxiliaries","permalink":"/docs/pages/Misc/Auxiliaries"}}');var r=n(74848),i=n(28453);const a={hide_table_of_contents:!1},c="Benchmark",d={},o=[{value:"Math Stress",id:"math-stress",level:2},{value:"Spawn/Delete",id:"spawndelete",level:2},{value:"String Operations",id:"string-operations",level:2},{value:"Basic",id:"basic",level:3},{value:"Complex",id:"complex",level:3},{value:"Summary",id:"summary",level:2}];function l(e){const t={a:"a",admonition:"admonition",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"benchmark",children:"Benchmark"})}),"\n",(0,r.jsx)(t.p,{children:"This page provides performance benchmarks comparing Jenova C++, GDScript and .NET (C#) across various tasks."}),"\n",(0,r.jsx)(t.h2,{id:"math-stress",children:"Math Stress"}),"\n",(0,r.jsx)(t.p,{children:"This test performs 100 million iterations of 3D vector math, where each vector is created and normalized before being added to an accumulated sum. It measures how efficiently the language handles floating-point operations, vector normalization and repeated memory access under computational stress."}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"BarChart_PerformanceChartA",src:n(2082).A+"",width:"1574",height:"544"})}),"\n",(0,r.jsx)(t.h2,{id:"spawndelete",children:"Spawn/Delete"}),"\n",(0,r.jsx)(t.p,{children:"A total of 1 million scene objects are instantiated from a preloaded template, added to the root of the scene tree, then removed and freed. This test evaluates object lifecycle performance, covering creation, insertion into the scene graph and cleanup."}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"BarChart_PerformanceChartB",src:n(87682).A+"",width:"1574",height:"544"})}),"\n",(0,r.jsx)(t.h2,{id:"string-operations",children:"String Operations"}),"\n",(0,r.jsx)(t.h3,{id:"basic",children:"Basic"}),"\n",(0,r.jsx)(t.p,{children:"In 100,000 iterations, numeric strings are appended to a growing buffer to simulate dynamic content building. When the string exceeds 64 characters, it\u2019s trimmed back to that length to keep it bounded. This test focuses on performance under frequent concatenation, memory resizing and substring slicing operations."}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"BarChart_PerformanceChartC",src:n(97344).A+"",width:"1574",height:"544"})}),"\n",(0,r.jsx)(t.h3,{id:"complex",children:"Complex"}),"\n",(0,r.jsx)(t.p,{children:'A large string is built by appending 100,000 numeric strings and truncated if it exceeds 16,384 characters. It is then reversed 1,000 times, searched 10,000 times for the pattern "999", and rearranged 5,000 times by swapping its halves. This complex test benchmarks string mutation, search and memory-heavy operations under stress.'}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"BarChart_PerformanceChartD",src:n(27282).A+"",width:"1574",height:"544"})}),"\n",(0,r.jsx)(t.h2,{id:"summary",children:"Summary"}),"\n",(0,r.jsx)(t.p,{children:"Based on the benchmark results, Jenova C++ Script demonstrates significantly higher performance across all tested categories compared to GDScript and C#. In computationally intensive tasks such as math processing and advanced string manipulation, C++ outperforms by a wide margin. While the difference is less pronounced in scene spawning and deletion, C++ still maintains an edge. Below is a breakdown of how much faster Jenova C++ performed in each test:"}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Benchmark Test"}),(0,r.jsx)(t.th,{children:"C++ Time (ms)"}),(0,r.jsx)(t.th,{children:"GDScript Time (ms)"}),(0,r.jsx)(t.th,{children:"C++ vs GDScript"}),(0,r.jsx)(t.th,{children:"C# Time (ms)"}),(0,r.jsx)(t.th,{children:"C++ vs C#"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"\ud83e\uddee Math Stress"}),(0,r.jsx)(t.td,{children:"245.60"}),(0,r.jsx)(t.td,{children:"5078.93"}),(0,r.jsx)(t.td,{children:"~20\xd7 faster"}),(0,r.jsx)(t.td,{children:"3564.10"}),(0,r.jsx)(t.td,{children:"~14.5\xd7 faster"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"\ud83e\ude84 Spawn/Delete"}),(0,r.jsx)(t.td,{children:"7116.30"}),(0,r.jsx)(t.td,{children:"7336.89"}),(0,r.jsx)(t.td,{children:"~1.03\xd7 faster"}),(0,r.jsx)(t.td,{children:"10686.80"}),(0,r.jsx)(t.td,{children:"~1.5\xd7 faster"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"\ud83e\uddf5 String Operation (Basic)"}),(0,r.jsx)(t.td,{children:"3.91"}),(0,r.jsx)(t.td,{children:"33.95"}),(0,r.jsx)(t.td,{children:"~8.7\xd7 faster"}),(0,r.jsx)(t.td,{children:"28.95"}),(0,r.jsx)(t.td,{children:"~7.4\xd7 faster"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"\ud83e\uddec String Operation (Complex)"}),(0,r.jsx)(t.td,{children:"9.57"}),(0,r.jsx)(t.td,{children:"16785.49"}),(0,r.jsx)(t.td,{children:"~175\xd7 faster"}),(0,r.jsx)(t.td,{children:"130.42"}),(0,r.jsx)(t.td,{children:"~13.6\xd7 faster"})]})]})]}),"\n",(0,r.jsx)("div",{className:"soft-tip",children:(0,r.jsx)(t.admonition,{title:"Information",type:"tip",children:(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["All performance tests were conducted on ",(0,r.jsx)(t.strong,{children:"Godot 4.5 beta1"})," (",(0,r.jsx)(t.strong,{children:"Windows 11 x64)"})," using an ",(0,r.jsx)(t.strong,{children:"Intel Core i9-12900K (24 Cores)"})]}),"\n",(0,r.jsxs)(t.li,{children:["All C++ benchmark operations performed on ",(0,r.jsx)(t.a,{href:"/pages/Mechanism#just-in-time-compilation",children:(0,r.jsx)(t.strong,{children:"Meteora"})})," interpreter backend."]}),"\n"]})})})]})}function h(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},97344:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/image-20250626144843434-ef57ff93b42aa34f6f75ba3e406e4828.png"},87682:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/image-20250626144853257-5b9c78f735fb921a5f6c61bc25c8e8c0.png"},2082:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/image-20250626144901455-c64cd8cd60c4248c72358caffb62e0c5.png"},27282:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/image-20250626144907866-65ff05aa1c0af767cb75099deb0f42e0.png"},28453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>c});var s=n(96540);const r={},i=s.createContext(r);function a(e){const t=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),s.createElement(i.Provider,{value:t},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.