Browse thread
Embedding the ocaml runtime in a shared library on amd64/x86_64
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2009-12-03 (11:53) |
From: | Alain Frisch <alain@f...> |
Subject: | Re: [Caml-list] Embedding the ocaml runtime in a shared library on amd64/x86_64 |
Joost Yervante Damad wrote: > Reading up on this, I don't think using -fPIC on amd64 has a performance > penalty since it has the %rip register. Also it appears that gcc by default > uses indirect addressing via %rip in the generated asm. I did some benchmarks when switching the ocamlopt AMD64 code generator to generate PIC code by default (in order to support Dynlink on native code): the slowdown was indeed very small (in the order of a few percent for micro benchmarks). Modern processors seem very good for optimizing indirect calls. Alain