The use of arithmetic to determine the chameneos compliments may be prohibited 
by the shootout rules.  Although the benchmark does not address the issue, the 
C# code, which was written by Isaac Gouy (one of the main shootout 
administrators) contains these comments before its complement code:
 
   // don't use arithmetic
   // use if-else or switch/case or pattern-match

If I recall correctly, Gouy's C# code has served as a sort of supplement for 
other benchmarks; rather than fully describe the benchmark, they'll say 
something like "implement it like this C# program."  However, I do note that 
the current Python entry uses arithmetic.  That might have been allowed only 
because Python doesn't allow enums.  (Or does it?) 

----- Original Message ----
From: Chris Kuklewicz <[EMAIL PROTECTED]>
To: Donald Bruce Stewart <[EMAIL PROTECTED]>; Haskell Cafe 
<haskell-cafe@haskell.org>
Sent: Friday, January 06, 2006 6:04:02 AM
Subject: [Haskell-cafe] Chameneos


Your "case" tweak was for an older version of Chameneos that used an
older Ch channel implementation.

But I was inspired by your improvement to use Int# instead of data
Color, and I posted a version that seems faster than the winning one
that was submitted. http://www.haskell.org/hawiki/ChameneosEntry

It still has to box the Int# to put it into the MVar channels.  But the
fastest complement is now (3# -# a -# b) and "if (other ==# faded)" is
faster than the previous "case other of Faded -> ; _ ->".  At least on
OS X / G4.

Also, thanks for cleaning up the SumFile code.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to