Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
RE: questions about costs of nativeint vs int
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: John Prevost <jmp@a...>
Subject: Re: questions about costs of nativeint vs int
>>>>> "xl" == Xavier Leroy <> writes:

    xl> Ocaml performs some amount of local (intra-function) unboxing
    xl> on large integers (nativeint, int32, int64) as well as on
    xl> floats.  Version 3.00 missed some opportunities for local
    xl> unboxing of large integers, but the next release will improve
    xl> this, bringing integer unboxing to the level of float
    xl> unboxing.  However, large integers as well as floats remain
    xl> boxed across functions and inside data structures (with a few
    xl> special cases for arrays and big arrays).

You say that this doesn't happen across function-call boundaries.  Am
I right in assuming that function-call boundaries that are smoothed
away by inlining are an exception to this?

What about tail-recursion boundaries?