Re: Nice article: "The Free Lunch is Over: A Fundamental Turn TowardConcurrencyinSoftware"

From: Eric Grange (egrangeNO_at_SPAMglscene.org)
Date: 01/09/05

  • Next message: Eric Grange: "Re: Memory Manager"
    Date: Sun, 09 Jan 2005 09:15:43 +0100
    
    

    > forgive me sometimes i think out loud. but let me see if i come come up
    > with some examples where i think a compiler could actually help. for
    > instance, if there is a case where a calculation is dealing solely with
    > local vars; and const params...

    That's exactly a case where the compiler can't go very far at all,
    because the coding language you used for

    > for Index := 1 to AParam1 do
    > Result := Result + AParam2;

    is explicitly sequential, parallelizing this automatically even in
    this dumb case is already very hard.

    Of course you could consider threading the whole call a progress,
    but that will not help you much further than for dual-CPU situations,
    and then only if all your threadable calls are made of short functions.
    On quad or octo, there just won't be enough non-dependant calls to
    reap x4 or x8 speedups.

    > of course you'd get better results by writing thread and synch code
    > yourself, but 1) it wouldn't look pretty and 2) you might make a mistake
    > in writing all that extra code. (much like pros/cons of writing ASM code)

    3) it would useless if you have more than 2 CPUs

    Concurrency isn't just for 2 CPUs, to be efficient, you need to spawn as many
    threads as you have CPUs.
    PS3 and XBOX2 hardware is already expected to enter the realm of quad and octo
    processors, Desktop PCs will have them in 2-3 years, and in ten years, 16, 32
    and more CPUs may not be rarities (some 256 CPUs chips already exist for networking
    hardware, and they aren't much more expensive than a P4). But what's worse is that
    you'll have more CPUs, but each of them will probably be individually slower than
    the CPUs we have today, making concurrency a necessity if you don't want your
    performance to go down (as is already the case for dual-core CPUs).
    For such hardware, multithreading as we know it just isn't a solution, wether
    manually coded or automatically guessed from explicitly-sequential code.

    There will be need for wholly different programming languages IMHO,
    where the developper will more or less be *forced* to be explicitly parallel,
    in the same way current languages *force* explicitly sequential bits of code.

    Eric


  • Next message: Eric Grange: "Re: Memory Manager"

    Relevant Pages

    • Re: [OT] Re: Whats the name for this?
      ... I need to point out that the older CPUs ... > step from the earlier dedicated computing devices. ... > in cases where the programmers themselves are more comfortable in a CISC ... > who programs with no knowledge of how a compiler works. ...
      (comp.programming)
    • Re: Benchmarking C compilers for embedded systems
      ... of of test code, target platform, compiler, and selected optimization ... run, and target hardware. ... There are still reasons to use 8 bit CPUs for such jobs, such as price, power consumption, package options and just plain legacy applications. ... For instance, I used a TSSOP8, and there isn't much choice in 32 bit CPUs for that kind of package, and there was even less choice just 5 years ago when I picked the CPU. ...
      (comp.arch.embedded)
    • Re: code optimization in embedded systems
      ... is the correct advice? ... better compiler. ... of the data (eg. char on 8/16-bit but int on 32-bit CPUs). ... efficient initialization of global variables at startup when possible. ...
      (comp.arch.embedded)
    • Re: Invoking External Batch Program on Multiple Core Machine
      ... (Although free version of command line .NET compiler is available, so if some new feature would greatly ... work (you pass it a file in the command line, it runs for 2-45 minutes and spits out another file). ... This is very annoying since I have a dual core machine and would like to get my work done as quickly as possible. ... You can use the Process class to start a new process with a specific command, and you can even set the ProcessorAffinity on the class instance to control what CPUs it runs on. ...
      (microsoft.public.dotnet.languages.csharp)
    • Re: Java is slow!
      ... AMD or Intel wins? ... as long as optimising your code for CPUs of one vendor does not ... The current AMD design seems to be simpler, so a compiler writer ...
      (comp.lang.java.advocacy)