[squeak-dev] Alien vs. FFI benchmarks (Re: Trying to load
ALienOpenGL into 4.1 alpha...)
Josh Gargus
josh at schwa.ca
Thu Mar 25 08:46:33 UTC 2010
On Mar 24, 2010, at 8:43 PM, Lawson English wrote:
>
> Would it ever be worth it to create a OpenGL plugin wrapper rather than use the FFI calls?
Your application would have to be *very* efficient (much more efficient than, say, Croquet's scene-graph):
[1000000 timesRepeat: [gl glGetError]] timeToRun 627
[1000000 timesRepeat: [Object new; new; new; new]] timeToRun 747
[1000000 timesRepeat: [OrderedCollection new add: 1]] timeToRun 1078
We're talking less than a microsecond per FFI call. Your whole application would have to be *heavily* optimized before this became the #1 bottleneck.
Cheers,
Josh
>
>
>
> Lawson
>
More information about the Squeak-dev
mailing list
|