-
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Take a look to see if we should use Syscalls instead of CGO for Windows #271
Comments
If I can, I would like to notice, there is purego from ebiten, which call dlopen, pass cgo funcs without compile cgo... |
Thanks! I'll have to take a look at how they've got it setup. |
In relation to syscall.SyscallN, I found it to be roughly 10% slower than CGO on small functions. |
it is true, however golang is loved for simply compilation, cgo is therefore problem that it need gcc and C dependency and hard cross-platform ..., beginer have problem on windows, so yes it is slow, but for beginer and easy cross is more suitable syscall ...., even purego is 5-10x slower than cgo, but it is able achieve 1396 fps (at basic example: gen2brain/raylib-go#361), so at this case I as programer prefer easy cross, because usualy we need 60,120 fps |
Yeah, I'm leaving the branch with the changes up for further investigation; specifically for the initial compile time and the cross-compile benefits. I've not abandoned the idea, but do want to make sure I get all the measurements. Something that would be pretty nice would be to have a compile tag to select which option you'd prefer, cgo for speed, or purego for ease of use. |
Currently CGO is nice because it can have some consistency between platforms. Otherwise, syscall can be used to construct and interact with windows.
The text was updated successfully, but these errors were encountered: