From e08d9d4d1d2b15b387719537e505bf25b2caa41e Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Fri, 10 May 2024 17:55:50 +0100 Subject: [PATCH] Update README.md --- README.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8b9366f..d9e6398 100644 --- a/README.md +++ b/README.md @@ -151,12 +151,17 @@ statically link and use in non-free / proprietary / commercial projects! # Performance -For fastest performance use Pypy rather than standard Python. +If you need more performance, do in this order: -Every call to C is costly, so it's slightly faster if you use Python data structures and functions when calculating +1. Use Pypy rather than standard CPython. It is much, much faster and will make more difference than any other optimisations you might do. + +2. Every call to C is costly, so it's slightly faster if you use Python data structures and functions when calculating in your update loop and then only convert them to C data structures when you have to call the C functions for drawing. +3. The raylib.* functions are potentially 1.5x faster than the pyray.* equivalents, so if you need a tiny bit more performance +you can switch your inner loop functions to these. + ## Bunnymark @@ -184,4 +189,4 @@ You can create a standalone binary using the Nuitka compiler. For example, here [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. [Coding Games With Pygame Zero & Python](https://github.com/electronstudio/pygame-zero-book) is -a book for Python beginners. \ No newline at end of file +a book for Python beginners.