what compiler for assembler?

Started by
15 comments, last by topsy_sweden 20 years, 8 months ago
quote:Original post by Xai
optimizing assembler


I don''t really think optimizing and assembler go well together
Advertisement
Why not? hand-crafted assembly code can be much faster than compiler generated code.
Yes, but assemblers now a'' days are much better at optimizing than the old ones.
I would say that there really isn''t any need to write assembly applications, unless you want the size of the application to go down.
quote:Original post by noVum
Why not? hand-crafted assembly code can be much faster than compiler generated code.


*Can* be, in theory, but not often. You''d have to be dealing with a pretty specific construct that confuses the compiler (causing it to generate a ''long way round'') to be able to beat it.

The only *real* needs for Assembler these days are on embedded systems (like the GBA) which run at pretty low speeds but need realtime apps; or for device developers (and even they don''t need to use it often).

Superpig
- saving pigs from untimely fates, and when he''s not doing that, runs The Binary Refinery.
Enginuity1 | Enginuity2 | Enginuity3 | Enginuity4

Richard "Superpig" Fine - saving pigs from untimely fates - Microsoft DirectX MVP 2006/2007/2008/2009
"Shaders are not meant to do everything. Of course you can try to use it for everything, but it's like playing football using cabbage." - MickeyMouse

I know that, but what Leffe said is simply wrong
and there ARE situations where assembler can speed up things very much, ignore the Java idiots that keep telling you the opposite.
some of you appear to be confused ..

when i said "optimizing assembler" ... i don''t mean HAND OPTIMIZED assembler ... because first of all, why would anyone write in assembler if they weren''t doing there best to optimize the code manually (it''s assumed you are TRYING to optimize if you are using assembler at all) ..

I was talking about an "optimizing assembler" or an assembler which optimizes the generated machine code ... there is absolutely no difference than this and an optimizing compiler ...

in fact, most compilers today optimize at different stages ... the early stages perform high-level optimizations (not available for assembler code) ... and the last stages simple perform machine targeted optimizations - and these may be provided by the CPU vendor in the for of optimizing assembler modules ... although nowdays the lowest level commonly used in C with inline assembly ...

anyway ... I would NEVER use a non-optimizing assembler .. because I know for a fact, a non-optimized assembler program which I could write would be slower than the optimized C equivelent ... because the optimizer can perform evaluations which I simply cannot ... detailed evaluation of loop unrolling tradeoffs, function call overhead, etc ...
Optimizing Assembler? I never heard about such a thing. AFAIK TASM/NASM/MASM and any inline assembler only translate the mnenomics to byte code.

This topic is closed to new replies.

Advertisement