i dont claim to know much about this optimisation, but it seems your intent in this post and the examples is to show people how using the new extensions framework can get you far more speed from a C routine than from the old internal ways and you point to some working examples.... they should follow as a guide
http://rebol.com/r3/docs/concepts/extensions-examples.html
given its you Carl, id thought you would have given some optimised working routines there for the maths functions you seem intent on showing off so as to get the best from R3 from the get go....
it seems your team might look at including all of these faster routines for x86 and include them with the rebol code examples to take advantage of them, even though they are not optimal, they appear to be far better than the current examples.
http ://graphics.stanford.edu/~seander/bithacks.html
as Marko points out in his PDF p19
http ://www.codex.gr/system/files/SoftwareOptimizations.pdf
"2.2 Branch elimination (cont.)
How do we elimitate branches?
● Avoid using if/else blocks to evaluate an
expression, eg. MIN/MAX could be calculated
this way:
// Only valid if (INT_MIN <= x-y <= INT_MAX)
// min(x,y)
r = y + ((x - y) & ((x - y) >> (sizeof(int) *
CHAR_BIT – 1)));
// max(x,y)
r = x - ((x - y) & ((x - y) >> (sizeof(int) *
CHAR_BIT - 1)));
instead of:
#define MIN(a,b) ((a) < (b) ? (a) : (b))
#define MAX(a,b) ((a) > (b) ? (a) : (b))
"
i know i said i would not advocate rebol or related rebol video GUI any more, but ill give it one more request and leave it at that if theres really no interest here.
please also include some basic examples of generic ffmpeg or VLC API, and show a working example of how you would make a basic rebol extension to use that current library, to take an input AVC.mkv datastream open a windows and put it on screen playing audio and video, and if possible also inside an updated rebol browser R3 plugin with a play pause stop etc...
for assembly programmers making their rebol extensions this is said to be a very good reference to have a round im told.
http ://www.agner.org/optimize/
as is this
http ://alien.dowling.edu/~rohit/nasmdocb.html |