egl: add a static trie-fetching implementation and use it for eglGetProcAddress()
Verified with dEQP-EGL.functional.get_proc_address.*
and an Intel CI run, but unfortunately I've been unable to measure any performance improvement for eglGetProcAddress()
.
Over 100'000 runs of eglGetProcAddress()
for all the entrypoints in eglentrypoint.txt
:
- bsearch:
Average: 83.514 us Mean: 73.888 us (±15.225 MAD) Min: 72.068 us Max: 171.644 us
- trie:
Average: 82.345 us Mean: 75.420 us (±7.586 MAD) Min: 70.854 us Max: 158.639 us
So basically no difference
Still, I did it and I think it's definitely nicer to use, so here goes.
Maybe other modules (gles?) could use this and would have better perfs?
Edit: I just realized that my distro is using GLVND, and I'm guessing that GLVND has its own eglGetProcAddress()
? Which means I haven't been testing my own code at all?
I'll run my benchmark on another system later.