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
Copy file name to clipboardExpand all lines: README.md
+8-3Lines changed: 8 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -151,12 +151,17 @@ statically link and use in non-free / proprietary / commercial projects!
151
151
152
152
# Performance
153
153
154
-
For fastest performance use Pypy rather than standard Python.
154
+
If you need more performance, do in this order:
155
155
156
-
Every call to C is costly, so it's slightly faster if you use Python data structures and functions when calculating
156
+
1. Use Pypy rather than standard CPython. It is much, much faster and will make more difference than any other optimisations you might do.
157
+
158
+
2. Every call to C is costly, so it's slightly faster if you use Python data structures and functions when calculating
157
159
in your update loop
158
160
and then only convert them to C data structures when you have to call the C functions for drawing.
159
161
162
+
3. The raylib.* functions are potentially 1.5x faster than the pyray.* equivalents, so if you need a tiny bit more performance
163
+
you can switch your inner loop functions to these.
164
+
160
165
## Bunnymark
161
166
162
167
@@ -184,4 +189,4 @@ You can create a standalone binary using the Nuitka compiler. For example, here
184
189
[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.
185
190
186
191
[Coding Games With Pygame Zero & Python](https://github.com/electronstudio/pygame-zero-book) is
0 commit comments