[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] x32 ABI fits Chicken very well

From: Sven Hartrumpf
Subject: [Chicken-users] x32 ABI fits Chicken very well
Date: Tue, 01 Sep 2015 07:51:42 +0200 (CEST)

Hi all.

Now that the "apply-hack" files are gone, Chicken is even more portable.
I am happy to report that Chicken 4.10.1 builds perfectly for the x32 ABI
( ).

Why should you try x32 that most people ignore?
- For garbage-intense Scheme program, you will see speed-ups of 10 to 30 %
  compared to x86-64 because the GC has less work to do.
- You can expect speed-ups of 20 - 30 % compared to i386 because all
  registers are available (on a 64bit CPU) and the full CPU instruction
  set is usable by Chicken's C compiler.

Here is a typical benchmark result:
x32      real  938.71s user  937.20s syst 0.56s 99% rmemKB 1456720
i386     real 1181.82s user 1180.17s syst 0.69s 99% rmemKB 1455148
x86-64   real 1100.30s user 1098.50s syst 0.81s 99% rmemKB 2235900

How to build Chicken for x32?

Caveat: You need a computer that supports x32 (in gcc, binutils, libc)!

Most linux distributions do not support x32, but Ubuntu 15.04 (64bit) does
(what other distros?).
You only need to run:

> sudo apt-get install libc6-dev-x32 libc6-x32 libx32atomic1 libx32gcc1 
> libx32gcc-4.9-dev libx32ncurses5 libx32ncurses5-dev libx32readline6 
> libx32readline6-dev libx32stdc++-4.9-dev libx32stdc++6 libx32z1 libx32z1-dev

Write a small gccx32 script like:
gcc -mx32 $*

> export CC=gccx32
> export ARCH=x86-64

Build Chicken 4.10.1 in the normal way.

Confirm that the resulting binaries have the correct ABI:
> file csi
csi: ELF 32-bit LSB executable, x86-64 ...
No, this is not a contradiction, it marks x32 binaries ...


reply via email to

[Prev in Thread] Current Thread [Next in Thread]