mitch@sgi.com (Thomas Mitchell) (12/22/90)
In article <1990Dec20.184056.12388@bellcore.bellcore.com> pc@flash.bellcore.com (Peter A Clitherow) writes: >>From: spuhler@hpcuhc.cup.hp.com (Tom Spuhler) >># > echo '2^9999/3^6308' |/bin/time bc Sitting here on a SGI Personal Iris (4D25) that also does mail routing for a corner of SGI. ie bzzzy. $ echo '2^9999/3^6308' |/bin/time bc 2 real 36.9 user 29.0 sys 0.8 $ ========== I dislike 'bc' for benchmarks. It is a silly way to do fun things. Still.... I have yet another 'bc' test. For which I will not submit a time. :-) One could work over the 'foreach' list to watch for lots of common 'scale/cache/memory/swap' related edges. Perhaps pass the data to an 'awk' ploting tool. I first put this together to 'hammer' swap space on a wonderful old 68010 Unix machine. I started with 1000! then 10,000! and kept running out of virtual memory or uptime at 50,000!. Run times on that '010 machine got as long as a week. At first I used to measure the output in feet of paper but trees are too valuable. Anyhow today 50,000! is too small a problem. --- snip ---------- #!/bin/csh foreach i ( 10 20 30 40 50 100 500 1000 \ 10000 \ 50000 ) echo "==============" echo "N=$i" timex bc << END_OF_FACTORIAL | wc define f(x) { auto t; if(x != 0) t=x; while ( x > 1 ) { t=t*(x-1); x=x-1; } return(t) } x = $i f(x) quit END_OF_FACTORIAL end -- -- Thomas P. Mitchell -- mitch@sgi.com or mitch%relay.csd@sgi.com "All things in moderation; including moderation."