You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -250,10 +249,18 @@ <h1>License (updated)<a class="headerlink" href="#license-updated" title="Link t
250
249
</section>
251
250
<sectionid="performance">
252
251
<h1>Performance<aclass="headerlink" href="#performance" title="Link to this heading"></a></h1>
253
-
<p>For fastest performance use Pypy rather than standard Python.</p>
254
-
<p>Every call to C is costly, so it’s slightly faster if you use Python data structures and functions when calculating
252
+
<p>If you need more performance, do in this order:</p>
253
+
<olclass="arabic simple">
254
+
<li><p>Use Pypy rather than standard CPython. It is much, much faster and will make more difference than any other optimisations you might do.</p></li>
255
+
<li><p>Every call to C is costly, so it’s slightly faster if you use Python data structures and functions when calculating
255
256
in your update loop
256
-
and then only convert them to C data structures when you have to call the C functions for drawing.</p>
257
+
and then only convert them to C data structures when you have to call the C functions for drawing.</p></li>
258
+
<li><p>The raylib.* functions are potentially 1.5x faster than the pyray.* equivalents, so if you need a tiny bit more performance
259
+
you can switch your inner loop functions to these.</p></li>
260
+
<li><p>There is a version of Python that is faster than Pypy: GraalPy. However it’s not fully compatible with all Python
261
+
packages. It doesn’t work with CFFI and so doesn’t work with this binding. But it <em>is</em> compatible with the
262
+
<em>Java</em> binding, Jaylib! There is an example of this here: https://github.com/electronstudio/megabunny/tree/master/raylib-python-jaylib</p></li>
263
+
</ol>
257
264
<sectionid="bunnymark">
258
265
<h2>Bunnymark<aclass="headerlink" href="#bunnymark" title="Link to this heading"></a></h2>
259
266
<tableclass="docutils align-default">
@@ -265,33 +272,49 @@ <h2>Bunnymark<a class="headerlink" href="#bunnymark" title="Link to this heading
See also https://github.com/electronstudio/megabunny/
172
183
173
184
# Packaging your app
174
185
@@ -183,4 +194,4 @@ You can create a standalone binary using the Nuitka compiler. For example, here
183
194
[RetroWar: 8-bit Party Battle](https://store.steampowered.com/app/664240/RetroWar_8bit_Party_Battle/?git) is out now. Defeat up to 15 of your friends in a tournament of 80s-inspired retro mini games.
184
195
185
196
[Coding Games With Pygame Zero & Python](https://github.com/electronstudio/pygame-zero-book) is
0 commit comments