Re: Some Interesting OpenSource Projects

new topic     » goto parent     » topic index » view thread      » older message » newer message

I already knew the algorithm, though not used an odd-only bitmap.
I figured out which byte/bit needed testing and let my brain stew on it for a couple of days before drumming up that little monster.

The performance of Phix suffers a little for subscripts (and to a slightly lesser extent floating point numbers).
The simple reason is that Phix does not have a proper register allocator yet, though one is planned for 2.0.0.
In particular, "s[i] op= x" potentially suffers an agi stall on both the fetch and store, which means 20-30 clocks
instead of 1 were ([shifted] ref)s already in a register. Some tight inner loops are ~8* slower than say gcc manages.
There is also no "with inline", and that many extra call/return can also prove a bit costly, relatively speaking.

Inline assembly like that is pretty much an almost/quite probably exclusively Phix-only thing.
(One exception I know for certain is that C++ and probably some plain C compilers have "intrinsics".)
For the builtin primitives, such as length() and sqrt(), there is simply no choice but to do it that way.
It is not normally worth the effort, though I might yet adopt some of that code into builtins\primes.e

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu