Subject: Re: 32-bit crunching in Scheme?
From: (Rob Warnock)
Date: 1998/12/09
Newsgroups: comp.lang.scheme
Message-ID: <74kojs$>
Juhani Rantanen <> wrote:
| Andy Gaynor <> wrote:
| >What implementation would be most suitable for doing
| >a lot of bitwise crunching of 32-bit (or N-bit) integers?
| If 30-bit integers suffice for your application, most Scheme
| implementations are quite OK, though I've found Gambit to be very
| efficient in intnum crunching. If you need precisely 32-bit integers,
| I let someone else answer the question:)

Elk 3.0 uses a two-word struct for a Scheme "value", and thus its
fixnums are whatever a native C "int" is. From "elk-3.0/include/object.h":

	typedef struct {
	    unsigned long data;
	    int tag;
	} Object;
	#define FIXNUM(x)       ((int)(x).data)

But for N-bit (N > 32), I've found MzScheme's bignums to be fairly fast...


Rob Warnock, 8L-855
Applied Networking
Silicon Graphics, Inc.		Phone: 650-933-1673
2011 N. Shoreline Blvd.		FAX: 650-964-0811
Mountain View, CA  94043	PP-ASEL-IA