Skip to content

Commit

Permalink
deploy: 83a7844
Browse files Browse the repository at this point in the history
  • Loading branch information
lihaoyi committed Jan 19, 2025
1 parent a361ff7 commit 95de3d5
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1354,4 +1354,14 @@
</tr>
</tbody></table>
<p><a href="https://github.com/com-lihaoyi/cask/pull/159">data source</a></p>
<p><em>Minimal Application (minimalApplicationWithLoom)</em> - Virtual threads show significantly better performance: - ~24x higher throughput (935.74 vs 38.36 requests/sec) - Much better latency (106.11ms vs 1.05s) - Platform threads experienced 1,076 timeout errors while virtual threads had none</p><hr /><p><b>About the Author:</b><i> Haoyi is a software engineer, an early contributor to <a href="http://www.scala-js.org/">Scala.js</a>, and the author of many open-source Scala tools such as Cask, the <a href="lihaoyi.com/Ammonite">Ammonite REPL</a> and <a href="https://github.com/lihaoyi/fastparse">FastParse</a>. </i></p><p><i>If you've enjoy using Cask, or enjoyed using Haoyi's other open source libraries, please chip in (or get your Company to chip in!) via <a href="https://www.patreon.com/lihaoyi">Patreon</a> so he can continue his open-source work</i></p><hr /><div style="display: flex; flex-direction: row; justify-content: space-between;"><div></div><a href="page/main-customization.html">Main Customization <i class="fa fa-arrow-right" aria-hidden="true"></i></a></div></div></body></html>
<p>The performance of non-blocking virtual threads varies, depending on whether blocking is a problem or not.</p>
<ul>
<li>
<p>For the <code>staticFilesWithLoom</code> and <code>todoDbWithLoom</code>, the benchmarks are largely CPU bound, and thus using Virtual Threads results in a minor performance slowdown over using platform threads.</p></li>
<li>
<p>For <code>minimalApplicationWithLoom</code>, which includes a small <code>Thread.sleep(100)</code> to simulate blocking, Virtual Threads show significantly better performance:</p></li>
<li>~24x higher throughput (935.74 vs 38.36 requests/sec)</li>
<li>Much better latency (106.11ms vs 1.05s)</li>
<li>Platform threads experienced 1,076 timeout errors while virtual threads had none</li>
</ul>
<p>In general virtual threads are most beneficial in applications which spend a lot of time blocked on IO. How much they benefit your own application will need to be benchmarked and measured, but they are relatively easy to enable so you can run your own small benchmarks before deciding to use them or not.</p><hr /><p><b>About the Author:</b><i> Haoyi is a software engineer, an early contributor to <a href="http://www.scala-js.org/">Scala.js</a>, and the author of many open-source Scala tools such as Cask, the <a href="lihaoyi.com/Ammonite">Ammonite REPL</a> and <a href="https://github.com/lihaoyi/fastparse">FastParse</a>. </i></p><p><i>If you've enjoy using Cask, or enjoyed using Haoyi's other open source libraries, please chip in (or get your Company to chip in!) via <a href="https://www.patreon.com/lihaoyi">Patreon</a> so he can continue his open-source work</i></p><hr /><div style="display: flex; flex-direction: row; justify-content: space-between;"><div></div><a href="page/main-customization.html">Main Customization <i class="fa fa-arrow-right" aria-hidden="true"></i></a></div></div></body></html>

0 comments on commit 95de3d5

Please sign in to comment.