From: Xavier Leroy <Xavier.Leroy@inria.fr>
To: Anton Moscal <msk@post.tepkom.ru>, caml-list@inria.fr
Subject: Re: O'Caml native code can be easily improved in size by 10%
Date: Thu, 4 Feb 1999 15:05:59 +0100 [thread overview]
Message-ID: <19990204150559.61903@pauillac.inria.fr> (raw)
In-Reply-To: <Pine.LNX.4.03.9902021757050.1195-101000@post.tepkom.ru>; from Anton Moscal on Tue, Feb 02, 1999 at 06:06:14PM +0300
> [Combining heap allocations inside one basic block]
This is an excellent idea. (I considered it briefly a long time ago,
while working on Gallium, an early precursor of the OCaml native-code
compiler, but the effects weren't really significant on the small
benchmarks that I used then.)
I'll implement it a bit differently than in your patch: instead of
grouping the allocations late (in Linearize), I'd rather group them
during instruction selection (Selectgen). One advantage is that the
optimization you describe (not reading youg_ptr again for each
sub-allocation) then comes "for free". Another advantage is that we
don't need to modify all code emitters...
> And the last: on x86 and m68k architectures `selection.ml' contains the
> following method:
> the alternative
> Cconst_int n -> (Ispecific(Istore_int(n, addr)), Ctuple [])
> processes storing of the Cconst_int immediate constants, but ignores the
> Cconst_natint constants.
Good point. I guess this part of the code wasn't updated when
"big constants" (Cconst_natint) were introduced. The right thing to
do is to put a Nativeint.t, not an int, as argument of Istore_int
and Ipush_int.
All this will be in 2.02. Combined with other optimizations I'm
working on, 2.02 should show some significant improvements in
execution speed and code size.
Thanks for your feedback,
- Xavier Leroy
prev parent reply other threads:[~1999-02-04 14:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-02-02 15:06 Anton Moscal
1999-02-04 14:05 ` Xavier Leroy [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=19990204150559.61903@pauillac.inria.fr \
--to=xavier.leroy@inria.fr \
--cc=caml-list@inria.fr \
--cc=msk@post.tepkom.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox