unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Marius Vollmer <mvo@zagadka.de>
Subject: Re: OT: x86 assembly timings/size
Date: Mon, 17 Nov 2003 22:27:45 +0100	[thread overview]
Message-ID: <871xs6r8ha.fsf@zagadka.ping.de> (raw)
In-Reply-To: <20031117191748.GA28701@mv3d.com> (Allister MacLeod's message of "Mon, 17 Nov 2003 14:17:48 -0500")

Allister MacLeod <amacleod@mv3d.com> writes:

> I forget the original expansion of lea.. maybe load extended
> address?

My guess would be "load effective address"... but it's not _really_
relevant, right? :-)

> I really ought to go look at an assembly reference myself.  A brief
> google for "x86 assembly timings lea" didn't turn up anything
> immediately and eminently useful in the first few hits.

I doubt that there are any simple and reliable timing diagrams for
IA-32 instructions in general.  I would imagine tho that lea uses the
addressing unit while shl goes thru the regular integer unit, on chips
that make the distinction.  It's all pretty idle speculation on my
part, tho.  Assembler used to be fun on the 68k but I've never written
more than three consecutive lines of x86 assembler.

> Anyway, probably the one with just lea's is slightly faster.
> Certainly unless the D=R1+R2*N instruction is more than twice as big
> as D=D+R1 or D=D<<N, the resulting binary will be smaller :^)

The main point is that it doesn't pay to try to outsmart the compiler.
Isn't that a comfortable insight?  I wouldn't want to worry whether
n-- > 0 is faster than --n >= 0.  Especially when n is unsigned...

-- 
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


  reply	other threads:[~2003-11-17 21:27 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-13 21:55 cmod-play 1 available + modsup.h additions Thien-Thi Nguyen
2003-11-14  8:26 ` Ludovic Courtès
2003-11-14 13:10   ` Thien-Thi Nguyen
2003-11-14 13:37     ` Ludovic Courtès
2003-11-14 17:38       ` Thien-Thi Nguyen
2003-11-14 14:29   ` Marius Vollmer
2003-11-14 14:17 ` Marius Vollmer
2003-11-14 15:28   ` Does anyone have a better scm_string_hash ? Roland Orre
2003-11-14 15:51     ` Ludovic Courtès
2003-11-17  8:33       ` Roland Orre
2003-11-17 13:01         ` Ludovic Courtès
2003-11-17 15:42         ` Marius Vollmer
2003-11-17 16:02           ` Marius Vollmer
2003-11-17 16:29             ` Marius Vollmer
2003-11-17 16:48               ` Allister MacLeod
2003-11-17 17:57                 ` Marius Vollmer
2003-11-17 19:17                   ` OT: x86 assembly timings/size (was Re: Does anyone have a better scm_string_hash ?) Allister MacLeod
2003-11-17 21:27                     ` Marius Vollmer [this message]
2003-11-19  9:04             ` Does anyone have a better scm_string_hash ? Ludovic Courtès
2003-11-19 15:02               ` Marius Vollmer
2003-11-14 17:40   ` cmod-play 1 available + modsup.h additions Thien-Thi Nguyen

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

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871xs6r8ha.fsf@zagadka.ping.de \
    --to=mvo@zagadka.de \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).