Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
FreeBasic forum and examples/previews quicklist
#61
Quote:Pointers are not hard at all, it's just "hype". Everyone says pointers are difficult 'cause they never took the time to learn them, so don't trust them. Trust me: pointers are easy.
Amen to that, man. Amen to that. Big Grin
I'd knock on wood, but my desk is particle board.
Reply
#62
Julia rings!!!!

http://rel.betterwebber.com/junk.php?id=33


Wan't to know how FB compares with MingW speed?
http://rel.betterwebber.com/junk.php?id=34

Algo I got here:
http://www.creativemagazine.com/science-...ndex.shtml

It's the mandel but once you understand the algo, it's easy to port it to julia.
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply
#63
ouch... the mingw one beats the fb version by a country mile on my computer. Sad I only got an average of 25 fps on it.

Ah, it's still much better than qb. But i've been fanticizing for a while that fb would cream mingw. Wink
Jumping Jahoolipers!
Reply
#64
1) GCC gens better code than any x86 C compiler excluding Intel's one (and hey, i know a bit of x86 asm and optimizations ;)

2) comparing a 3 months old project, made by 1 person, against the genius that work/worked writing GCC is not that fair.

3) the codes aren't exactly the same, i just changed the FB one to ..

Code:
tmp = cint((red+grn+blu) * 0.33)
red = cint((red+grn+tmp) * 0.33)
grn = cint((grn+blu+tmp) * 0.33)
blu = cint((blu+red+tmp) * 0.33)

.. and the average FPS that was 36 on Rel's original and 23 on the slowest parts jumped to 73 at the fastest, and 46 at the slower parts.. twice as fast.

INT() does truncation, what is a slow operation that needs a function call and FPU control word changes, what is reaaaally slow. CINT() is done with a single instruction.

A Floating-point division is way too slower than a multiplication by a reciprocal, as Rel was doing in the C version.


Stills, GCC will beat FB and ANY commercial BASIC compiler easily, coz first: it's a C compiler, and second, it's an optimizing one - i don't know any optimizing BASIC compiler, probably not worth taking into account all the behind-the-curtains things that a BAS compiler has to do.
Reply
#65
Hehehe. That MingW proggie has Full optimization checked. :*)
But still, I can't notice a freaking speed increase on my system.

v1c: Integer divide slower than mul by recip? wow!!!
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply
#66
For first gen Pentium's and MMX's:

IDIV by 32-bit reg/imm: 46 clocks

FMUL: 3 clocks


For PPro's, PII and P3's:

IDIV: 39 clocks (latency)

FMUL: 5 clocks (latency)


Pentium 4's:

IDIV: 50 uops (latency)

FMUL: 7 uops (ditto)


As you see, yeah, it makes a big difference ;)
Reply
#67
Quote:2) comparing a 3 months old project, made by 1 person, against the genius that work/worked writing GCC is not that fair.

Still, the person with the 3 month old project is a genius as well. Smile Agreed?
Jumping Jahoolipers!
Reply
#68
Just an odd thought... if FB went multiplatform, how would GCC take to having it added to the collection? I don't think there's a basic compiler in there, is there? Then you might be able to get some more help with. Then again, I don't know how that entire operation is run.

They'd probably make you take out the runtime though :/
Reply
#69
SDL + OpenGL example.

Easy to do in FB it hurts:

http://rel.betterwebber.com/junk.php?id=35

That after reading just 3 articles off the redbook. :*). OGL is easier than any QB lib to learn. It's a pity I can't use textures since this render would drastically slow down to a crawl. :*(
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply
#70
Is DX this slow on your computer? It's harder than OGL, but still.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)