<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[A Simple Benchmark Performance Test for LiquidBounce&#x27;s ScriptAPI]]></title><description><![CDATA[<p dir="auto"><em><strong>Author: mumy</strong></em></p>
<h2>Introduction</h2>
<p dir="auto">Since LiquidBounce switched its ScriptAPI language to JavaScript from version b57, it has provided powerful extensibility. However, the community has not conducted a specific performance evaluation on it. Recently, I realized this gap and decided to perform a simple benchmark to assess its performance.</p>
<h2>Test</h2>
<p dir="auto">I plan to divide the scripts into two categories: Standard Scripts and Hybrid Scripts (e.g., <a href="https://forum.liquidbounce.net/topic/8020"><code>mumyPacketDebugger</code></a>). The tests will include Fibonacci numbers, the Sieve of Eratosthenes, and block scanning in the world. For the Nextgen version, tests will be conducted using ZuluJDK and GraalVM.</p>
<p dir="auto"><strong>The final result will be based on the shortest time taken after the runtime stabilizes.</strong></p>
<h2>Script</h2>
<p dir="auto"><a href="/assets/uploads/files/1736737899802-benchmark-for-legacy-b99-and-nextgen-0.24.zip">Benchmark for legacy b99 and nextgen 0.24.zip</a></p>
<h2>Platform</h2>
<ul>
<li><strong>OS</strong>: Windows 10 22H2</li>
<li><strong>CPU</strong>: Intel i9-14900HX (locked at 5.0GHz)</li>
<li><strong>RAM</strong>: DDR5 16GB + 16GB 5600MHz</li>
</ul>
<h2>Environment</h2>
<ul>
<li><strong>Legacy</strong>
<ul>
<li>Version: b99</li>
<li>JDK: ZuluJDK 8</li>
<li>Minecraft: Forge 1.8.9 + OptiFine M5</li>
</ul>
</li>
<li><strong>Nextgen</strong>
<ul>
<li>Version: 0.24</li>
<li>JDK: ZuluJDK 21 / Oracle GraalVM 21</li>
<li>Minecraft: Fabric 1.21.4 + Sodium 0.6.6</li>
</ul>
</li>
</ul>
<h2>Results</h2>
<p dir="auto"><strong>Legacy</strong></p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Test Case</th>
<th>Fibonacci</th>
<th>Sieve of Eratosthenes</th>
<th>World Scanner</th>
</tr>
</thead>
<tbody>
<tr>
<td>Standard Script</td>
<td>149ms</td>
<td>61482ms</td>
<td>1539ms</td>
</tr>
<tr>
<td>Hybrid Script</td>
<td>59ms</td>
<td>1147ms</td>
<td>311ms</td>
</tr>
</tbody>
</table>
<p dir="auto"><strong>Nextgen</strong></p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Test Case</th>
<th>Fibonacci</th>
<th>Sieve of Eratosthenes</th>
<th>World Scanner</th>
</tr>
</thead>
<tbody>
<tr>
<td>Standard Script + ZuluJDK</td>
<td>9890ms</td>
<td>9629ms</td>
<td>9368ms</td>
</tr>
<tr>
<td>Standard Script + Oracle GraalVM</td>
<td>144ms</td>
<td>1277ms</td>
<td>1952ms</td>
</tr>
<tr>
<td>Hybrid Script + ZuluJDK</td>
<td>67ms</td>
<td>1023ms</td>
<td>195ms</td>
</tr>
<tr>
<td>Hybrid Script + Oracle GraalVM</td>
<td>52ms</td>
<td>982ms</td>
<td>177ms</td>
</tr>
</tbody>
</table>
<h2>Conclusion</h2>
<p dir="auto">There are some special versions of LiquidBounce that I haven't tested, but most of them are outdated and have limited reference value (e.g., Legacy-b73 1.12.2 or Nextgen 0.17, which didn't yet support GraalJS JIT).</p>
<p dir="auto">For the <strong>Legacy</strong> version, since Nashorn has been used as the Script engine since b57, theoretically, there are no significant performance differences across versions.</p>
<p dir="auto">For <strong>Nextgen</strong>, if you don't use GraalVM to launch LiquidBounce, you may experience lag when running standard scripts. I recommend using <strong>LiquidLauncher</strong> to solve this issue.</p>
]]></description><link>https://forum.liquidbounce.net/topic/8391/a-simple-benchmark-performance-test-for-liquidbounce-s-scriptapi</link><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Jul 2026 12:59:35 GMT</lastBuildDate><atom:link href="https://forum.liquidbounce.net/topic/8391.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 13 Jan 2025 02:40:32 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to A Simple Benchmark Performance Test for LiquidBounce&#x27;s ScriptAPI on Fri, 24 Jan 2025 18:48:47 GMT]]></title><description><![CDATA[<p dir="auto">Dev environment</p>
<pre><code>[02:09:47] [Render thread/INFO] (Minecraft) [System] [CHAT] LiquidBounce ▸ Fibonacci [time: 23306ms, value: 39088169]
[02:09:47] [Render thread/INFO] (Minecraft) [System] [CHAT] LiquidBounce ▸ SieveEratosphen [time: 46371ms, value: 49999991]
[02:09:47] [Render thread/INFO] (Minecraft) [System] [CHAT] LiquidBounce ▸ WorldScanner [time: 28334ms, value: 10302255]
</code></pre>
<p dir="auto">Production environment</p>
<pre><code>[02:41:41] [Render thread/INFO]: [System] [CHAT] LiquidBounce ▸ Fibonacci [time: 1571867ms, value: 39088169]
[02:41:41] [Render thread/INFO]: [System] [CHAT] LiquidBounce ▸ SieveEratosphen [time: 46668ms, value: 49999991]
[02:41:41] [Render thread/INFO]: [System] [CHAT] LiquidBounce ▸ WorldScanner [time: 28094ms, value: 10302255]
</code></pre>
<p dir="auto">Both using i7-9750H, 32G DDR4 RAM with OpenJDK on Linux with <strong>Nextgen</strong>. Standard script only.</p>
<p dir="auto">Fibonacci in development environment is significantly faster than production environment. (23s vs 1571s)</p>
]]></description><link>https://forum.liquidbounce.net/post/39958</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/39958</guid><dc:creator><![CDATA[commandblock2]]></dc:creator><pubDate>Fri, 24 Jan 2025 18:48:47 GMT</pubDate></item><item><title><![CDATA[Reply to A Simple Benchmark Performance Test for LiquidBounce&#x27;s ScriptAPI on Wed, 22 Jan 2025 09:09:23 GMT]]></title><description><![CDATA[<p dir="auto">alright good to know</p>
]]></description><link>https://forum.liquidbounce.net/post/39950</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/39950</guid><dc:creator><![CDATA[EclipsesDev]]></dc:creator><pubDate>Wed, 22 Jan 2025 09:09:23 GMT</pubDate></item><item><title><![CDATA[Reply to A Simple Benchmark Performance Test for LiquidBounce&#x27;s ScriptAPI on Wed, 22 Jan 2025 04:48:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/eclipsesdev" aria-label="Profile: EclipsesDev">@<bdi>EclipsesDev</bdi></a> (by mumy)<br />
The test results show a performance difference of less than 1% compared to b98, and the remapper is working correctly.<br />
(legacy b100 git-99f4b13)</p>
]]></description><link>https://forum.liquidbounce.net/post/39949</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/39949</guid><dc:creator><![CDATA[CookieChinese]]></dc:creator><pubDate>Wed, 22 Jan 2025 04:48:02 GMT</pubDate></item><item><title><![CDATA[Reply to A Simple Benchmark Performance Test for LiquidBounce&#x27;s ScriptAPI on Wed, 22 Jan 2025 04:32:18 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/cookiechinese" aria-label="Profile: CookieChinese">@<bdi>CookieChinese</bdi></a> should be fixed in latest nightly build <a href="https://github.com/CCBlueX/LiquidBounce/pull/5406" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/CCBlueX/LiquidBounce/pull/5406</a> pls try again</p>
<div class="row github-embeds-container">

<div class="col-md-6">
<div class="github-embed card">
<div class="card-body">


<div class="meta">
<img class="author-picture not-responsive" src="https://avatars.githubusercontent.com/u/93977077?v=4" title="MukjepScarlet" />
<a href="https://github.com/MukjepScarlet"><span class="username">MukjepScarlet</span></a> opened this pull request <span class="timeago" title="2025-01-22T04:28:24Z"></span> in <a href="//github.com/CCBlueX/LiquidBounce">CCBlueX/LiquidBounce</a>
</div>
<h3>

<span class="badge closed float-end">closed</span>

<a href="https://github.com/CCBlueX/LiquidBounce/pull/5406">fix(legacy): Remapper (caused by #4995)</a>
<span class="number">#5406</span>
</h3>


</div>
</div>
</div>

</div>]]></description><link>https://forum.liquidbounce.net/post/39948</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/39948</guid><dc:creator><![CDATA[EclipsesDev]]></dc:creator><pubDate>Wed, 22 Jan 2025 04:32:18 GMT</pubDate></item><item><title><![CDATA[Reply to A Simple Benchmark Performance Test for LiquidBounce&#x27;s ScriptAPI on Thu, 16 Jan 2025 16:05:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/eclipsesdev" aria-label="Profile: EclipsesDev">@<bdi>EclipsesDev</bdi></a> (by-mumy)<br />
I tested using the b98 release, and its remapper is working properly, allowing the use of MCP names.</p>
<pre><code class="language-javascript">//@ts-ignore
 blocks.push(mc.theWorld.getBlockState(blockPos.set(x, y, z)));
</code></pre>
<p dir="auto">And the results:</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Test Case</th>
<th>Fibonacci</th>
<th>Sieve of Eratosthenes</th>
<th>World Scanner</th>
</tr>
</thead>
<tbody>
<tr>
<td>Standard Script</td>
<td>152ms</td>
<td>60056ms</td>
<td>1482ms</td>
</tr>
</tbody>
</table>
<p dir="auto">Due to the theoretically small performance difference in hybrid scripts, testing is no longer conducted.</p>
]]></description><link>https://forum.liquidbounce.net/post/39934</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/39934</guid><dc:creator><![CDATA[CookieChinese]]></dc:creator><pubDate>Thu, 16 Jan 2025 16:05:47 GMT</pubDate></item><item><title><![CDATA[Reply to A Simple Benchmark Performance Test for LiquidBounce&#x27;s ScriptAPI on Thu, 16 Jan 2025 13:10:10 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/cookiechinese" aria-label="Profile: CookieChinese">@<bdi>CookieChinese</bdi></a> only b99? if so then could u maybe test the b99 build commit before <a href="https://github.com/CCBlueX/LiquidBounce/pull/4995" target="_blank" rel="noopener noreferrer nofollow ugc">b8ff415</a></p>
]]></description><link>https://forum.liquidbounce.net/post/39932</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/39932</guid><dc:creator><![CDATA[EclipsesDev]]></dc:creator><pubDate>Thu, 16 Jan 2025 13:10:10 GMT</pubDate></item><item><title><![CDATA[Reply to A Simple Benchmark Performance Test for LiquidBounce&#x27;s ScriptAPI on Tue, 14 Jan 2025 19:30:08 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/commandblock2" aria-label="Profile: commandblock2">@<bdi>commandblock2</bdi></a> (by-mumy)<br />
Yes, the remapper for Legacy b99 is broken, but it only affects the function name mapping, while the field names remain unaffected. This issue has led to the use of srg function names instead of mcp function names in the Legacy scripts.</p>
]]></description><link>https://forum.liquidbounce.net/post/39929</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/39929</guid><dc:creator><![CDATA[CookieChinese]]></dc:creator><pubDate>Tue, 14 Jan 2025 19:30:08 GMT</pubDate></item><item><title><![CDATA[Reply to A Simple Benchmark Performance Test for LiquidBounce&#x27;s ScriptAPI on Tue, 14 Jan 2025 16:29:58 GMT]]></title><description><![CDATA[<p dir="auto">Looks quite unexpected to me that for Fibonacci the performance is worse for the graaljs compared to nashorn. Also from my side, using</p>
<pre><code class="language-js">//@ts-ignore
blocks.push(mc.theWorld.func_180495_p(blockPos.func_181079_c(x, y, z)));
</code></pre>
<p dir="auto">vs</p>
<pre><code class="language-js">//@ts-ignore
blocks.push(mc.world.getBlockState(blockPos.set(x, y, z)));
</code></pre>
<p dir="auto">does not look the same to me because the later involves remapping (which may lower it's performance). I am quite curious why in the script for Legacy b99 you used the srg names instead of mcp names, is the remapping for Legacy broken now? (haven't launched Legacy version for a long time myself)</p>
]]></description><link>https://forum.liquidbounce.net/post/39928</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/39928</guid><dc:creator><![CDATA[commandblock2]]></dc:creator><pubDate>Tue, 14 Jan 2025 16:29:58 GMT</pubDate></item></channel></rss>