log in | register | forums
Show:
Go:
Forums
Username:

Password:

User accounts
Register new account
Forgot password
Forum stats
List of members
Search the forums

Advanced search
Recent discussions
- Elsear brings super-fast Networking to Risc PC/A7000/A7000+ (News:)
- Latest hardware upgrade from RISCOSbits (News:)
- RISC OS London Show Report 2024 (News:1)
- Announcing the TIB 2024 Advent Calendar (News:1)
- Code GCC produces that makes you cry #12684 (Prog:39)
- RISCOSbits releases a new laptop solution (News:)
- Rougol November 2024 meeting on monday (News:)
- Drag'n'Drop 14i1 edition reviewed (News:)
- WROCC November 2024 talk o...ay - Andrew Rawnsley (ROD) (News:2)
- October 2024 News Summary (News:3)
Latest postings RSS Feeds
RSS 2.0 | 1.0 | 0.9
Atom 0.3
Misc RDF | CDF
 
View on Mastodon
@www.iconbar.com@rss-parrot.net
Site Search
 
Article archives
Acorn Arcade forums: Programming: Run this on your Intel Mac please
 
  Run this on your Intel Mac please
  ksattic (20:09 2/12/2006)
  moss (20:19 3/12/2006)
    ksattic (02:00 5/12/2006)
      VincentVega (16:35 16/12/2006)
        ksattic (18:38 17/12/2006)
        monkeyson2 (02:35 18/12/2006)
  andypoole (20:33 3/12/2006)
    ksattic (17:44 4/12/2006)
 
Simon Wilson Message #95101, posted by ksattic at 20:09, 2/12/2006
ksattic
Finally, an avatar!

Posts: 1291
http://simonrules/osx/sqrt.zip

It does 100 million inverse square roots using the sqrt function (slowpath) and the Quake 3 fast InvSqrt function (fastpath).

The Iyonix is 260 times slower than my 2.16GHz MacBook Pro! It's all floating point, though.

Times for the Mac:

slowpath: 4520ms
fastpath: 1050ms

Compiled with gcc with -O3. XCode is slower!

I'm worried because my 1.2GHz Athlon Linux server is faster by 25% on the fastpath.
  ^[ Log in to reply ]
 
John Hoare Message #95194, posted by moss at 20:19, 3/12/2006, in reply to message #95101

Posts: 9348
a) Surely you mean http://www.simonrules.com/osx/sqrt.zip :P
b) On my 1.66Mhz Intel Core Duo Mac Mini:

slowpath: 5830 ms
fastpath: 1360 ms
  ^[ Log in to reply ]
 
Andrew Poole Message #95195, posted by andypoole at 20:33, 3/12/2006, in reply to message #95101
andypoole
Mouse enthusiast
Web
Twitter

Posts: 5558
Last login: Sun Dec 3 20:30:47 on ttyp1
Welcome to Darwin!
Minnie:~ andrew$ cd Desktop
Minnie:~/Desktop andrew$ ./sqrt
slowpath: 5830 ms
fastpath: 1340 ms
Minnie:~/Desktop andrew$
(1.66Ghz Intel Core Duo Mac Mini, 512MB RAM, OS X 10.4.5 (Freshly installed this afternoon, hence not up to day yet... that's tomorrow's job.))
  ^[ Log in to reply ]
 
Simon Wilson Message #95262, posted by ksattic at 17:44, 4/12/2006, in reply to message #95195
ksattic
Finally, an avatar!

Posts: 1291
Thanks guys. I recompiled with XCode to vectorise code where possible, and I managed to beat my Linux machine by about 50%. I'll post the figures later. The app should only use one core of the CPU as it only has one thread, so the Mac doesn't get to leverage its dual core advantage.
  ^[ Log in to reply ]
 
Simon Wilson Message #95292, posted by ksattic at 02:00, 5/12/2006, in reply to message #95194
ksattic
Finally, an avatar!

Posts: 1291
a) Surely you mean http://www.simonrules.com/osx/sqrt.zip :P
Oops! Thanks for fixing that!

Here's XCode with all optimisations on:

slowpath: 4500 ms
fastpath: 550 ms
  ^[ Log in to reply ]
 
VV Message #95897, posted by VincentVega at 16:35, 16/12/2006, in reply to message #95292
Member
Posts: 7
On a 3.0GHz Mac Pro (2GB RAM):

slowpath: 3300ms
fastpath: 830ms

I wonder why fastpath is slower than your 550ms. Perhaps the higher latency of the FB-DIMMs in the Mac Pro are slowing it down a bit.
  ^[ Log in to reply ]
 
Simon Wilson Message #95928, posted by ksattic at 18:38, 17/12/2006, in reply to message #95897
ksattic
Finally, an avatar!

Posts: 1291
It's not - the version you downloaded was the gcc version, so my fastpath was 1050ms. :)
  ^[ Log in to reply ]
 
Phil Mellor Message #95943, posted by monkeyson2 at 02:35, 18/12/2006, in reply to message #95897
monkeyson2Please don't let them make me be a monkey butler

Posts: 12380
On a 3.0GHz Mac Pro (2GB RAM):
:drool:
  ^[ Log in to reply ]
 

Acorn Arcade forums: Programming: Run this on your Intel Mac please