Re: Somewhat offtopic: any suggestions/wishes for a programming language amenable to strong optimisation?



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.

From generally reading manufacturers technical data and future
aspirations, multi-core processors are not only here at the moment
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

.



Relevant Pages

  • Re: Why return None?
    ... > That extend doesn't work for strings and tupples is irrelevant. ... If lists were being designed from scratch today, ... A "greenfield design", an entirely new language designed from scratch, ...
    (comp.lang.python)
  • Re: (Falsifiability is binary) Re: Textbook text candidate
    ... recognise design in the abstract without reference to the methods ... volume and strength of the evidence, ... You have a linik to a language aquatitional page. ... and right up and down why would aliens not use a similar form. ...
    (talk.origins)
  • Re: [Lit.] Buffer overruns
    ... this is a long rant about the links between language ... Both to some extent but definitely worse within the C community than in, ... >> culture (I am contrasting Ada and C only because I have a lot of first ... culture of low level design that it has unwittingly fostered. ...
    (sci.crypt)
  • Re: (Falsifiability is binary) Re: Textbook text candidate
    ... It adds nothing to the question of idetifying DESIGN. ... You have a linik to a language aquatitional page. ... Imagine if you will the way Hieroglyics are written left and right up and down why would aliens not use a similar form. ... To snidely asume noone has looked for primes in DNA belies the intense scritiny that undergraduagte scramble for thesies. ...
    (talk.origins)
  • Re: Speculative Design Hypothesis (with predictions) 2nd draft
    ... I'm not saying that DNA is a language ... natural languages has nothing to do with design. ... bat wings - therefore bat wings "had to be" ... So far, I'm the only person to mention the blue duck, so it's unfair of ...
    (talk.origins)