🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.powerpc
Article #3553

Re: UseMarks -- our own benchmarks

#3553
From: David Franklin
Date: Mon, 01 Apr 1996 20:26
44 lines
2898 bytes
Gregory L Hansen (ghansen@isc.sjsu.edu) wrote:
: If you can supply code for some real benchmarks, then I will heartily 
: endorse it.  The UseMarks use code that anyone can examine, compile, and 
: run on their own machines.  They also cover any number of tests the 
: participants come up with.  My benchmark was only because it is pretty 
: lame to suggest a course of action and not do anything to get it 
: started.  But I apparantly know so little about benchmarks, I didn't know 
: I proposed a bad one.  So I'm counting on help from the participants, 
: anyone who'se interested.  Even in the "Oh yeah?  Can your machine do 
: this?" catagory.
: 
Here's a slightly more substantial benchmark (is an obfuscated C solution
to the problem of finding arrangements of the 12 pentominoes that fit
in a 6 x 10 grid):

#include <stdio.h>
#define M(x,y) Z=x,x=y,y=Z;
#define K b[*U++]
#define R *Q++=*U++-*a
char W=6,H=10,F[12][32],L[12],S[12],Z,*U,O[300],*B=O+40;long T,i,j;
void G(int N,char *b){char o,Y,*P;if(N){while(*++b);
for(Y=12;Y--;)if(L[Y]){L[Y]=0;P=F[Y];for(o=S[Y];U=P,o--;P+=4)
if(!(K||K||K||K)){U=P;Z=Y+65;K=*b=Z,K=Z,K=Z,K=Z;G(N-1,b);
U=P;K=*b=0,K=0,K=0,K=0;}L[Y]=1;}}else printf("%s%d\n\n",B,++T);}
main(){char p,t,k,*Q;for(p=0;Q=F[p],p<12;p++){for(t=8;t--;)
{char m="737040221000"[p],a[5];if(!(t&m)){for(k=0;k<4;k++){int c=
"678=23457=>?234:78>?7=>C28>?789=2379278>78>D678>"[k+p*4]-48,
x=c%6-1,y=c/6;if(t&1)x=-x;if(t&2)y=-y;if(t&4)M(x,y)a[k]=x+y*9;}
a[4]=0;for(i=300;j=i%4,i--;)if(O[i]=L[i%12]=32-22*(i%9==3),
a[j+1]<a[j])M(a[j],a[j+1])U=a+1;R;R;R;R;S[p]++;}}}
for(j=H;j--;)for(i=W;i--;B[i+j*9]=0);B[H*9-1]=0;G(12,B-1);}

N.B. This code assumes char is signed - a global search and replace of
"char" with "unsigned char" will be sufficient to fix this if your machine
uses unsigned chars.

I don't claim this is a good benchmark, but I'm interested in timings - 
the two I have are for my home and work machines (Home is DX-50 and takes
6 minutes, work is a SGI (R4400 @ 200Mhz) and takes 30 seconds), are a 
bit more different than I'd expect.

Dave

: 
Technical Details
Message-ID: <4jpe51$m9v@newsgate.dircon.co.uk>
Path: arc1-ca.pugleaf.net!dish.news.pipex.net!pipex!dircon!tdc!not-for-mail
References: <nevin-0602962253080001@150.135.1.79> <4jfs0h$mer@daily-planet.nodak.edu> <4jh7qt$e1s@nuke.csu.net> <315C45C0.167E@detroit.sgi.com> <4jp1p2$e68@nuke.csu.net>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!dish.news.pipex.net!pipex!dircon!tdc!not-for-mail
From: kaoskat@dircon.co.uk (David Franklin)
Newsgroups: comp.sys.powerpc,comp.os.linux.advocacy,comp.sys.mac.advocacy,comp.os.os2.advocacy,comp.sys.amiga.advocacy,comp.sys.intel
Subject: Re: UseMarks -- our own benchmarks
Followup-To: comp.sys.powerpc,comp.os.linux.advocacy,comp.sys.mac.advocacy,comp.os.os2.advocacy,comp.sys.amiga.advocacy,comp.sys.intel
Date: 1 Apr 1996 20:26:09 GMT
Organization: Direct Connection
Message-ID: <4jpe51$m9v@newsgate.dircon.co.uk>
References: <nevin-0602962253080001@150.135.1.79> <4jfs0h$mer@daily-planet.nodak.edu> <4jh7qt$e1s@nuke.csu.net> <315C45C0.167E@detroit.sgi.com> <4jp1p2$e68@nuke.csu.net>
NNTP-Posting-Host: tdc.dircon.co.uk
X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]