Board index » delphi » Re: Delphi to take advantage of multiple threads within the compiler>

Re: Delphi to take advantage of multiple threads within the compiler>


2005-06-21 05:18:25 AM
delphi139
Crazy Horse's crazier little brother writes:
Quote
IMO, the words "simple" and "multi-threaded" do not belong in the
same sentence.
I agree -- I always crack up when I read posts that start out "It
shouldn't be that hard to implement <whatever>in the compiler", as if
compiler building, testing, and deploying is not much more than
dropping a few buttons on a form.
--
Nick Hodges -- TeamB
Lemanix Corporation -- www.lemanix.com
Read my Blog -- www.lemanix.com/nick
 
 

Re: Delphi to take advantage of multiple threads within the compiler>

Nick Hodges [TeamB] writes:
Quote
I agree -- I always crack up when I read posts that start out "It
shouldn't be that hard to implement <whatever>in the compiler", as if
compiler building, testing, and deploying is not much more than
dropping a few buttons on a form.
Bla. Plop a few lines in LEX and YACC and your good to go.
--------------
Joe Bain
www.iegsoftware.com
 

Re: Delphi to take advantage of multiple threads within the compiler>

"Nick Hodges [TeamB]" <XXXX@XXXXX.COM>writes
<42b732a1$XXXX@XXXXX.COM>
Quote
I agree -- I always crack up when I read posts that start out "It
shouldn't be that hard to implement <whatever>in the compiler", as if
compiler building, testing, and deploying is not much more than
dropping a few buttons on a form.
If it was that easy, we'd have twenty zillion different Object Pascal
compilers to choose from by now. Instead, the market is effectively a
monopoly.
--
***Free Your Mind***
Posted with Reader3000-BETA 0.9.4.848
 

Re: Delphi to take advantage of multiple threads within the compiler>

Crazy Horse's crazier little brother
<XXXX@XXXXX.COM>writes
<42b73148$XXXX@XXXXX.COM>
Quote
IMO, the words "simple" and "multi-threaded" do not belong in the same
sentence.
Oh, it is not that hard if you follow a few simple rules. But if you deviate
from those rules, you are really toast.
--
***Free Your Mind***
Posted with Reader3000-BETA 0.9.4.848
 

Re: Delphi to take advantage of multiple threads within the compiler>

marc hoffman writes:
Quote
What a great idea!
What a classic idea!
How does that quote go? Something like: "Those who don't know history
are doomed to repeat it."
--
John Kaster blogs.borland.com/johnk
Features and bugs: qc.borland.com
Get source: cc.borland.com
If it is not here, it is not happening: ec.borland.com
 

Re: Delphi to take advantage of multiple threads within the compiler>

Eric,
...
Quote
Been discussed here several months ago... this one is a tough nut to
crack, but with 2-4 way cores coming to the desktops today, and 8 to
64-way core starting to show up on AMD/Intel roadmaps, the old
fashionned multithreading will be showing its age.
You forgot that (almost) all questions regarded massive parallel computing
are answered, at least good enough for us mortal developers. "Big Iron",
computers in universities, science labs etc. are parallel since aeons.
I programmed a 64 cpu machine (means: 64 Sparc CPUs plus one to manage the
tribe, connected by a _really_ fast network) back in the nineties in a
language called C*. As mentioned in another posting, semaphores etc. are not
the appropiate tools you use in such a language, it is all message driven.
The machine, a Thinking Machine CM5, was wrecked '95 and replaced with a 36
CPU IBM beast. There was even a very old CM2 with 256 much smaller CPUs.
You can find all the basics, more or less all language enhancements and
models and many other clever MP computer related ideas in the IEEE and ACM
papers. The problem: the connection between the ivy tower science world and
the personal computers we have on our desktops or even the servers in their
19" racks is very thin. Mostly students and some companies are buildung
parallel machines using standard computers, but that is more or less all.
And: the language can do something, but to get some real bang for the multi
CPU core buck, you have to think and write code to get these cores busy.
Btw, if you can build some automatism in the compiler, then I am sure that
you can build it into a virtual machine too. What if Microsoft plans to add
some fancy spread-it-over the cores feature for .Net? The guys and girls in
Redmond are very sharp, most of them the best you can get. They know that
all that parallel stuff is the future, and they know it since years. They
are Microsoft, they have plans.
Ralf
 

Re: Delphi to take advantage of multiple threads within the compiler>

John Kaster (Borland) writes:
Quote
How does that quote go? Something like: "Those who don't know history
are doomed to repeat it."
Only if the "knowing" part and the "repeating" part are executing on
separate threads, then yes. ;-P
 

Re: Delphi to take advantage of multiple threads within the compiler>

John,
Quote
>What a great idea!
What a classic idea!

How does that quote go? Something like: "Those who don't know history
are doomed to repeat it."
You've lost me there. What does that have to do with me applauding to an
idea Danny mentioned in an interview?
 

Re: Delphi to take advantage of multiple threads within the compiler>

Quote
If it was that easy, we'd have twenty zillion different Object Pascal
compilers to choose from by now. Instead, the market is effectively a
monopoly.
<yawn />
 

Re: Delphi to take advantage of multiple threads within the compiler>

Quote
Oh, it is not that hard if you follow a few simple rules. But if you deviate
from those rules, you are really toast.
Isn't that the definition for something hard? That minute failures can
bite? ;)
Eric
 

Re: Delphi to take advantage of multiple threads within the compiler>

Quote
Well, if he should go through the effort and expense of actually
RE-ARCHITECTING the compiler, and not support native 64-bit, then may
Borland R.I.P.
It could be to generate Java bytecode, wasn't that on the tables some
time ago? Java at the time wasn't flexible enough, but Java has since
evolved and some compromises were made for D.Net already.
I would much like a 64bit effort announced soon, but so far, hints have
been too far-fetched and peripherals for me, and there just seems to be
a lack of enthusiasm from Borland on the 64bit front, while .Net is all
monopolizing the buzz.
Eric
 

Re: Delphi to take advantage of multiple threads within the compiler>

Quote
You forgot that (almost) all questions regarded massive parallel computing
are answered, at least good enough for us mortal developers. "Big Iron",
computers in universities, science labs etc. are parallel since aeons.
Yes, but the tasks they perform are *very* different from those
performed in more general software. Meteorological simulation, FEM,
fluids, thermodynamics simulations or exhaustive validations are
intrinsically more parallelizable problems.
Another difference is that those big iron programs are targeted at
specific hardware, general software in the new era will have to contend
with a variety of core count, and it will have to work alongside other
applications it has never heard about, which will compete for CPU time.
Quote
Btw, if you can build some automatism in the compiler, then I am sure that
you can build it into a virtual machine too.
Virtual machines will be good for entreprise stuff, where many more
clients will be able to run on the same physical server pool.
I'm not so sure they'll have much use for end-users.
Quote
What if Microsoft plans to add some fancy spread-it-over the cores
feature for .Net?
They'll have some trouble, some fundamental .Net paradigms are
implicitly single threaded, not the least being the GC. Scaling .Net
beyond dual core will require quite some reengineering, and in the end
it may only share the name, just like DirectX 9 shares the DirectX name
but bears little similarity to its early ancestors.
Quote
The guys and girls in Redmond are very sharp, most of them the best
you can get. They know that all that parallel stuff is the future,
and they know it since years.
Looking at .Net and recent reactions of .Net architects, compared to
those of the C++ compiler peeps, I am actually certain MS was caught with
their pants down on the multi-core thing. it is blatantly obvious that
many parts of .Net were designed for ever-increasing single-core CPUs,
which didn't happen (if you doubt it, have a look at the concurrent GC
and the MS recommendantions for using .Net on multi-core servers).
Quote
They are Microsoft, they have plans.
They're certainly making plans, but did they plan for 4 to 8 core CPUs
being available to desktop users by Longhorn release?
I seriously doubt it, and haven't seen any hint yet to the contrary
(even their licensing options for multicore haven't been truly figured
out yet).
Eric
 

Re: Delphi to take advantage of multiple threads within the compiler>

Eric,
...
Quote
Yes, but the tasks they perform are *very* different from those
performed in more general software. Meteorological simulation, FEM,
fluids, thermodynamics simulations or exhaustive validations are
intrinsically more parallelizable problems.
There was and is more, like interactive 3d graphics, db systems etc. You
don't need massive parallel applications for email or word processing :-)
Intel knows that and is looking for new shores. And video decompression is
almost perfectly parallelizable. Of course, a dedicated chip can do that job
for $10 and with 3W power consumption, but that is not the Intel way.
Quote
Another difference is that those big iron programs are targeted at
specific hardware, general software in the new era will have to
contend with a variety of core count, and it will have to work
alongside other applications it has never heard about, which will
compete for CPU time.
C* and other languages with parallel constructs are not that much hardware
specific. The concepts are very similar. You don't get language A für
machine X, but that does not mean that there is stuff in that language A
that is not portable to machine X.
...
Quote
Virtual machines will be good for entreprise stuff, where many more
clients will be able to run on the same physical server pool.
I'm not so sure they'll have much use for end-users.
My fault, I meant intermediate language driven machines. Java, .Net...
Quote
>What if Microsoft plans to add some fancy spread-it-over the cores
>feature for .Net?

They'll have some trouble, some fundamental .Net paradigms are
implicitly single threaded, not the least being the GC. Scaling .Net
beyond dual core will require quite some reengineering, and in the end
it may only share the name, just like DirectX 9 shares the DirectX
name but bears little similarity to its early ancestors.
I don't buy that. Microsoft knows that they will not get that 5 GHz machine
in 2006. So, Longhorn will not be any faster (only "feeled speed") than
Windows 2000 - it will even be slower because the single cores are slower
than the 3.8 GHz Extreme CPUs you can buy today. Ok, I can't, the price is
{*word*201} :-) Let's see what color the rabbit will have, all we can do is to
sit, wait and throw peanuts.
...
Quote
Looking at .Net and recent reactions of .Net architects, compared to
those of the C++ compiler peeps, I am actually certain MS was caught
with their pants down on the multi-core thing. it is blatantly obvious
that many parts of .Net were designed for ever-increasing single-core
CPUs, which didn't happen (if you doubt it, have a look at the
concurrent GC and the MS recommendantions for using .Net on
multi-core servers).
I'll do, thanks for the suggestion. My only direct contact to .Net and
threading is a presentation of Derek Davidson. The language enhancements of
Chrome regarding threading are simply cool and elegant, and if you can use
something easily, there is a chance that you will use it at all.
Whatever happens, it will be very interesting. Maybe Microsoft has something
unbelieveable cooking, maybe they need another IE weightlifting. Maybe, but
I don't bet on it, they are in deep trouble.
Ralf
 

Re: Delphi to take advantage of multiple threads within the compiler>

Quote
You don't need massive parallel applications for email or word processing :-)
Well, sounds like you haven't tried searching my mail history or seen
the kind of word documents the marketing throws at us round here ;)
(not that there are many words in those Word documents...)
Quote
C* and other languages with parallel constructs are not that much hardware
specific. The concepts are very similar. You don't get language A für
machine X, but that does not mean that there is stuff in that language A
that is not portable to machine X.
Portability is only part of the problem, you will want it portable *and*
efficient. A message-based application designed to run on 64 low-speed
cores will have some trouble adapting to single or dual fast-speed
cores, as the threading overhead in that situation will make it
uncompetitive. Yet, that is the kind of things applications will be
expected to achieve, and that is the kind of things big iron never
encountered.
Quote
I don't buy that. Microsoft knows that they will not get that 5 GHz machine
in 2006.
They know it now, did they knew it when they designed .Net? I think not,
there are just too many signs in .Net architecture that make it a
single-core platform.
Quote
So, Longhorn will not be any faster (only "feeled speed") than
Windows 2000 - it will even be slower because the single cores are slower
than the 3.8 GHz Extreme CPUs you can buy today.
It will be faster than Win 2k, even if only because it will incorporate
the speedups of Win2k3 (many of these thanks to MS's updated C++ compiler).
Quote
Ok, I can't, the price is {*word*201} :-)
Well, most new Windows versions were slower than the former one
(exceptions being Windows XP and Win2k3) yet they still sold them...
Win95 starts lighting-fast nowadays, and that is under a Virtual PC ;)
Quote
Let's see what color the rabbit will have, all we can do is to
sit, wait and throw peanuts.
Shouldn't we throw carrots at the rabbit rather than peanuts? ^_^
Eric
 

Re: Delphi to take advantage of multiple threads within the compiler>

Eric,
Quote
>You don't need massive parallel applications for email or word
>processing :-)

Well, sounds like you haven't tried searching my mail history or seen
the kind of word documents the marketing throws at us round here ;)
(not that there are many words in those Word documents...)
Maybe you should work on the email filter. Could resolve your Word overdose,
too :-) I only have about 27,000 mails in The Bat, so it is useable.
And about the differences between "big iron" and multicore cpus: many
scientific computers are using multicore cpus, and not the slowest ones. Of
course, the language enhancements evolved since my time at the GMD. I don't
say that their model is perfect for our needs, but imho it will be _much_
better than the critical section stuff we use today.
...
Quote
>Let's see what color the rabbit will have, all we can do is to
>sit, wait and throw peanuts.

Shouldn't we throw carrots at the rabbit rather than peanuts? ^_^
My son wants some rabbits, I don't think he'd like it if we actually hit one
;-) But I can provide the carrots if you don't tell him. We have some in our
garden somewhere. Gotta dig...
Ralf