Re: Somewhat offtopic: any suggestions/wishes for a programming language amenable to strong optimisation?
- From: hutch-- <hutch@xxxxxxxxx>
- Date: 29 Apr 2007 05:06:01 -0700
David,
It seemed that assembly programmers would make the best group of people
to ask this: I am in the throes of designing a programming languagem
and am wondering what programming language features would make it easy
to write highly-optimised and/or easily-optimisable code (for modern
x86 processors)? Where do current languages fall down? Where does
assembly beat mid-level or high-level languages?
Something that seems to have been missed in the above discussion is
what is assumed in your original question, if you are making
comparisons to assembler language for x86, then you can routinely rule
out code and compiler design that has assumptions related to any other
hardware and in particular, RISC compiler design. The persistent CISC
design of x86 does not look like its going to change any time soon and
the more current cores tend to work internally as RISC while providing
a CISC interface in terms of instructions.
aspirations, multi-core processors are not only here at the momentFrom generally reading manufacturers technical data and future
with 4 core stuff being current but in the predictable future 8, 16
and greater core counts will most probably come available and this
will change the design of software that can be divided into parallel
asynchronous processes. A common example here is a web server where
multiple connections in parallel will get faster while complex linear
processing will not get faster at all.
Thee is no reason at all to assume that multi-core processors are more
tolerant of slow sloppy code than single core processors so I would
agree with your approach that making your code output smaller or
faster or more efficient is still a useful strategy if performance
matters with your compiler.
A dual approach is what I am suggesting, a low level understanding of
how x86 code works on a thread by thread basis to simply get it fast
enough while also taking proper advantage of the instruction range of
the processor instead of the phony RISC approach that some compilers
use of limiting instructions to tose that more closely represent those
in other hardware.
The OS platform will dictate how you handle multi-threading and in
this area I would be inclined to have both automatic thread handling
capacity for the donkeys as well as processor nomination for users who
need the extra power and control.
As far as the semantics of your new language, probably having an
inline assembler makes sense if you want that level of control
available but I would also put some support for things like stack
frame free procedures where assembler can be used to advantage without
incurring excessive overhead.
Regards,
hutch at movsd dot com
.
- References:
- Prev by Date: Re: 68k look-up tables
- Next by Date: Re: Where, oh where, is Frank
- Previous by thread: Re: Somewhat offtopic: any suggestions/wishes for a programming language amenable to strong optimisation?
- Next by thread: Re: Somewhat offtopic: any suggestions/wishes for a programming language amenable to strong optimisation?
- Index(es):
Relevant Pages
|