I have an ANCIENT (circa 1990--it covers the hot, new 486) assembly book that has the instruction timings for 8086 through 80486. I've seen a couple of Intel opcode refrences, but I haven't seen any with timings. I know lsomebody must know them, because Apgar's document on Pentium Optimization includes comments like "don't use BT, use TEST if you can because it's faster" etc. I realize that Pentium and later processors have pipes and instruction caches and such which can obviate a lot of that information, but still it would be handy to know why, for example, shl is better than mul, etc.

Also, I could swear I saw a page somewhere on or near this site that had a bunch of common assembly optimization/tricks, especially I remember an early one was "using lea instead of add" but now I cannot find it. Anyone know offhand where that is?

Thanks!

-Chalain
It may look like I'm sitting here doing nothing, but at the cellular level I'm really quite busy.
Posted on 2002-04-18 09:54:50 by Chalain
Agner Fogs help file also includes timings, search for Integer, or Float in the index. There should be a section for each, and for both PPlain/MMX and PPro/PII/PIII. Alas there are no timings available for the P4 yet though.

Mirno
Posted on 2002-04-18 10:03:37 by Mirno
Intel and AMD have x86 optimization guides with instruction latency timing tables, and the rest of the documentation isn't bad either. :)
Posted on 2002-04-18 10:11:52 by bitRAKE

Intel and AMD have x86 optimization guides with instruction latency timing tables, and the rest of the documentation isn't bad either. :)


I believe you. Unfortunately, I don't have these guides, which is why I asked. :tongue: :)

Where can I find them?

-Chalain
Experienced programmer, new to assembly: give me a clue, and I'll run with it....
Posted on 2002-04-18 10:26:33 by Chalain
So, you want me to browse their company websites or google, and post direct links for you? If I had the links in my back pocket, then I would have posted them. :)

Here you go:
http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/22007.pdf
http://developer.intel.com/design/pentium4/manuals/

The journey is always as important as the destination,
if not more so.
Posted on 2002-04-18 11:03:30 by bitRAKE

So, you want me to browse their company websites or google, and post direct links for you?


Well... yeah! By the way, are you done with my laundry yet?

Seriously though, thank you for your help. It would have sufficed to tell me to poke around intel.com or give me some keywords to search google... I didn't know CPU mfrs left that stuff out where people could download it--everything I've seen so far is stuff people have ripped to .chm files. :)

If I had the links in my back pocket, then I would have posted them. :)


Extra starch on the collars, please.... :grin:

The journey is always as important as the destination,
if not more so.


Agreed, if for no other fact that along the way you learn which plants you can eat, and which ones will give you the runs.

Again, thank you all for the help. Assembly isn't particularly hard, it's just very, very intricate and knowing where to start (and stop!) is more than half the battle.

Thank you,

-Chalain
Make up your own funny sig. I'm tired.
Posted on 2002-04-18 13:13:32 by Chalain

Agreed, if for no other fact that along the way you learn which plants you can eat, and which ones will give you the runs.
Never the runs, just a lot of gas (i.e. hot air).
Posted on 2002-04-18 14:04:54 by bitRAKE

Never the runs, just a lot of gas (i.e. hot air).


Heh, that's actually one of my pet peeves, actually. If I come across like a gasbag, please do me the favor of poking me with something sharp. :)

I'm in (what I believe to be) a fairly unique situation in that I've been programming for nigh on 20 years, and I rather think I write a fair stick of C and C++. There's lots of crossover knowledge that certainly helps, like not fleeing in terror when the program compiles but the linker hurls bizarre errors. :) But as I've said, my experience with assembly and things "asm-ish" is utter void. I feel like I could figure everything out if someone would just point out that I'm holding the book upside down. I will gladly hold forth on any topic that I actually happen to be competent in, but if I get out of my depth, I'll thank you in advance for pointing it out.

Fortunately, I'm not too afraid of looking foolish. Unfortunately, that's because I've done it so much that I've become desensitized....

Anyway, you were probably making a generic joke and I'm probably reading too much personally into it. Thank you again for your kind help.

Cheers,

-Chalain
PFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFT
Posted on 2002-04-18 14:56:49 by Chalain
Don't take it personal - I was actually talking about myself. :tongue:
Posted on 2002-04-18 15:30:00 by bitRAKE
Chalain,

With 20 years experience, the knowledge of architecture is the one that works for you. Learning assembler is just a matter of detail and with your background, stuff like data sizes, addressing and similar will make your entry a lot easier.

Regards,

hutch@movsd.com
Posted on 2002-04-18 17:09:08 by hutch--