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
My original cgo bindings took 4 minutes to compile with go (WITH GO).
That was on tip between 1.1 and 1.2.
4 minutes! go compile times really spoiled me so I had to fix this ;)
I did a bunch of things to make the source smaller that should also help glow.
Especially since the core 4.4 package compiles into a 13MB .a file.
Beyond that in my newest binding generator I dropped the entire idea of having individual pointers.
Going from individually named function pointers to a sized array (not slice) of functions pointers shaved 2MB off my library.
My original cgo bindings took 4 minutes to compile with go (WITH GO).
That was on tip between 1.1 and 1.2.
4 minutes! go compile times really spoiled me so I had to fix this ;)
I did a bunch of things to make the source smaller that should also help glow.
Especially since the core 4.4 package compiles into a 13MB .a file.
https://github.com/bryanturley/old_gl/blob/master/core/funcs.go#L1178
Scroll to the very end of that line. You will see // 14
That means those 14 opengl functions share that function signature.
Which in turn means you can turn 14 bridges into 1.
The only downside to that is you get semi-ugly looking unnamed bridge functions.
In this example the type bgl003_t is only used with the function bgl003 (3 hex digits)
https://github.com/bryanturley/old_gl/blob/master/core/funcs.go#L326
The go side of those 14 functions all call bgl003 with their own function pointer (of type bgl003_t), since they all share the same function signature.
https://github.com/bryanturley/old_gl/blob/master/core/funcs.go#L4860 <-- one of the bgl003
I think this shrunk my source files 40-60% and should make a significant impact on your library size.
The text was updated successfully, but these errors were encountered: