From: Atanas Bachvaroff <chervarium@SIGBUS.nove.bg>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] "ridiculous benchmarks"-r-us
Date: Fri, 9 Jan 2004 22:54:10 +0200 [thread overview]
Message-ID: <200401092054.i09KsGeR010802@SIGBUS.nove.bg> (raw)
In-Reply-To: <0af7b239ace45c567f28524ff95b5613@plan9.ucalgary.ca>
[-- Attachment #1: Type: TEXT/plain, Size: 4516 bytes --]
On 9 Jan, mirtchov@cpsc.ucalgary.ca wrote:
> Rog at vitanuova already caught how stupid the following article is
> (linked to from slashdot):
>
> http://osnews.com/story.php?news_id=5602
>
> It took me much longer -- until I looked at their "C" code (term used
> very loosely) trying to compile it on Plan 9... There are multiple
> gems in it including ++ on a double, mid-function variable definitions
> (C-code, right?), log10(0.0), impossible to look at I/O, etc. In
> fact, I'm attaching the benchmark for your viewing pleasure :)
>
> Anyway, the exercise took very little time and here are some "results"
> showing how good Plan 9's compiler are (where's a Bushnell when you
> need one?), it would be interesting to see how the long arithmetic can be improved:
>
> pcc (code untouched except for mid-function variable definitions moved to top):
>
> Int arithmetic elapsed time: 17540 ms with intMax of 1000000000
> i: 1000000001
> intResult: 1
> Double arithmetic elapsed time: 65500 ms with doubleMin 10000000000.000000, doubleMax 11000000000.000000
> i: 11000000000.000000
> doubleResult: 10011632717.495501
> Long arithmetic elapsed time: 262540 ms with longMin I64d, longMax I64d
> i: I64d
> longResult: I64d
> Trig elapsed time: 25070 ms with max of 10000000
> i: 10000000.000000
> sine: 0.990665
> cosine: -0.136322
> tangent: -7.267119
> logarithm: 7.000000
> squareRoot: 3162.277502
> [crashes during the last test while reading back the file it just wrote]
>
> gcc (code untouched, no -O):
>
> Int arithmetic elapsed time: 23770 ms with intMax of 1000000000
> i: 1000000001
> intResult: 1
> Double arithmetic elapsed time: 56040 ms with doubleMin 10000000000.000000, doubleMax 11000000000.000000
> i: 11000000000.000000
> doubleResult: 10011632717.495501
> Long arithmetic elapsed time: 53500 ms with longMin I64d, longMax I64d
> i: I64d
> longResult: I64d
> Trig elapsed time: 30680 ms with max of 10000000
> i: 10000000.000000
> sine: 0.990665
> cosine: -0.136322
> tangent: -7.267119
> logarithm: 7.000000
> squareRoot: 3162.277502
> [crashes during the last test while reading back the file it just wrote]
>
> 8c (modified to use nsec() for timing, printf -> print, fixed log10(0.0) crash, fix %I64d in print()):
>
> Int arithmetic elapsed time: 17517 ms with intMax of 1000000000
> i: 1000000001
> intResult: 1
> Double arithmetic elapsed time: 22525 ms with doubleMin 10000000000.000000, doubleMax 11000000000.000000
> i: 11000000000.000000
> doubleResult: 10011632717.495500
> Long arithmetic elapsed time: 565067 ms with longMin 10000000000, longMax 11000000000
> i: 11000000000
> longResult: 776627965
> Trig elapsed time: 25881 ms with max of 10000000
> i: 10000000.100000
> sine: 0.972106
> cosine: -0.234542
> tangent: -4.144701
> logarithm: 7.000000
> squareRoot: 3162.277518
>
>
> It is important to note that the integer performance of 8c is
> comparable to gcc 3.3's -O[23] running on Plan 9 and Linux
> respectively. The double arithmetic lags by about 20%. The I/O is
> comparable (2x slower when going over a 100mbit link, no caching).
>
> Profiling the long long code to see where it looses all that time may
> be interesting.
>
> All computation performed on a 8-way 700mhz Xeon, only 1 cpu used :)
>
> Sorry for wasting your time -- just wanted to see how good 8c was and
> got caught in all the other crap. It's Friday after all... :)
>
> Andrey
That's what I get on SGI Octane R12k/270MHz with the MIPSpro 7.3 C++
compiler as my MIPSpr C compiler is too much standard...
Start C benchmark
Int arithmetic elapsed time: 32870 ms with intMax of 1000000000
i: 1000000001
intResult: 1
Double arithmetic elapsed time: 21700 ms with doubleMin 10000000000.000000, doubleMax 11000000000.000000
i: 11000000000.000000
doubleResult: 10011632717.495501
Long arithmetic elapsed time: 72920 ms with longMin I64d, longMax I64d
i: I64d
longResult: I64d
Trig elapsed time: 5730 ms with max of 10000000
i: 10000000.000000
sine: 0.990665
cosine: -0.136322
tangent: -7.267119
logarithm: 7.000000
squareRoot: 3162.277502
I/O elapsed time: 3540 ms with max of 1000000
last line: abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefgh
Total elapsed time: 136760 ms
Stop C benchmark
--
BEATVSHOMOQVIINVENITSAPIENTIAMETQVIAFFLVITPRVDENTIALIVRILVCIFERIVS
[-- Attachment #2: Type: APPLICATION/pgp-signature, Size: 256 bytes --]
prev parent reply other threads:[~2004-01-09 20:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-09 17:42 mirtchov
2004-01-09 17:47 ` ron minnich
2004-01-09 18:19 ` Icarus Sparry
2004-01-09 18:37 ` mirtchov
2004-01-09 20:25 ` Sam
2004-01-09 20:29 ` Charles Forsyth
2004-01-09 20:44 ` Sam
2004-01-09 20:44 ` Brantley Coile
2004-01-10 0:37 ` Dennis Ritchie
2004-01-09 20:48 ` mirtchov
2004-01-11 1:02 ` [9fans] 'ridiculous benchmarks'-r-us Joel Salomon
2004-01-09 18:52 ` [9fans] "ridiculous benchmarks"-r-us Brantley Coile
2004-01-09 20:06 ` Tristan Seligmann
2004-01-10 5:06 ` boyd, rounin
2004-01-09 19:40 ` Roman Shaposhnick
2004-01-09 20:54 ` Atanas Bachvaroff [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200401092054.i09KsGeR010802@SIGBUS.nove.bg \
--to=chervarium@sigbus.nove.bg \
--cc=9fans@cse.psu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).