Juhani Rantanen <misty@pao.fiba.tampere.fi> wrote:
+---------------
| Andy Gaynor <silver@mail.webspan.net> 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
-----
Rob Warnock, 8L-855 rpw3@sgi.com
Applied Networking http://reality.sgi.com/rpw3/
Silicon Graphics, Inc. Phone: 650-933-1673
2011 N. Shoreline Blvd. FAX: 650-964-0811
Mountain View, CA 94043 PP-ASEL-IA