Skip to content

Programming language shootout

Jeff Henrikson edited this page Nov 8, 2023 · 4 revisions

The programs

Here are implementations for some programs from the Computer Language Benchmarks Game for Gambit.

Running k-nucleotide.scm with the largest data set creates a string of length 5,000,000. With four-byte characters (Gambit's default) this is 20,000,000 byte object, and the largest object that can be created in a 32-bit system is a bit less than 16MB. So, either configure Gambit with --enable-char-size=1 (or 2) or use a 64-bit version of Gambit.

The suggested build and install procedure for Gambit on the Computer Language Benchmarks Game machine is

./configure CC='gcc -march=pentium4 -mfpmath=sse -msse2' --enable-single-host --enable-char-size=1
make
make install

This installs Gambit in /usr/local/Gambit-C, and the binaries gsi and gsc are in /usr/local/Gambit-C/current/bin.

  • binary-trees.scm
  • chameneos-redux.scm
  • fannkuch.scm
  • fasta.scm
  • k-nucleotide.scm
  • mandelbrot.scm
  • meteor-contest.scm
  • n-body.scm
  • nsieve.scm
  • nsieve-bits.scm
  • partial-sums.scm
  • pidigits.scm
  • recursive.scm
  • regex-dna.scm
  • reverse-complement.scm
  • spectral-norm.scm
  • startup.scm
  • sum-file.scm
  • thread-ring.scm
Clone this wiki locally