Closed lluz55 closed 4 years ago
Not quite sure where this comes from. I tried running the basic window example with both the plain C source and in Zig and they have about the same CPU usage. Also when you look at the binding all it really does is define extern functions, structs and enums so nothing that could really impact CPU usage.
Check raylib/src/config.h
, comment SUPPORT_BUSY_WAIT_LOOP
and SUPPORT_HALF_BUSY_WAIT_LOOP
Also when you look at the binding all it really does is define extern functions, structs and enums so nothing that could really impact CPU usage.
I know. I just wanted to have some idea of what could be doing this. I tested with Nim bindings and it shares similar result as in Go
Closing this as the binding no longer depends on a pre-installed raylib version.
FWIW, I encountered this on Linux raylib 3.7 zig 0.8. Commenting out SUPPORT_HALF_BUSY_WAIT_LOOP
dropped the CPU to near-0.
Zig bindings:
Go bindings: