![]() |
|
|
Thread Tools | Display Modes |
#21
|
|||
|
|||
![]()
Jay Windley said:
The issue of runtime optimization is strictly one of profiling -- looking at how code behaves when it runs and optimizing it accordingly based on this information. Not really. A dynamic optimizer has an advantage over a static optimizer. Static optimizers are often thwarted by not knowing all the code that is running. Things like the possibility of aliasing (non- obvious ways of having multiple ways of referring to the same variable) force static optimizers to be conservative. There is at least one JVM (currently, iirc, owned by BEA) that can over-optimize the code because it knows what other code is also loaded into the JVM. Should the program load some new code, the JVM can deoptimize the code as needed to prevent problems. A large dose of engineering good taste is needed to be sure you don't loose more than you gain in dynamic optimization. This is not generally available to static optimizers, but natively-compiled languages such as C/C++ can use standalone optimizers to identify problematic code stretches. This really isn't a language thing. Traditionally, C/C++ has been statically optimized, but there is nothing that would prohibit a HotSpot-like system that detected performance-sensitive code and optimized it. With most C/C++ systems, this would be a machine-code to machine-code optimizer, with the advantage of being usable with any language that compiles to machine code. The simplistic example I posted was, of course, an unambiguously invariant loop body. Both Java and C will, if set up to optimize to the same degree, remove that code and eliminate the loop entirely. It was based on a comparison I read a while back which used a somewhat less straightforward loop which the HotSpot JVM had optimized (correctly) into oblivion while the C compiler (gcc) had not. As I said, it doesn't appear that this happens very often and the benchmarking people don't seem interested in it. Actually, the benchmarking people were interested in it because the compiler writers optimized their products for best benchmark numbers, resulting, as you say, in optimizing away entire loops. (Tuning to the benchmark was not just a software thing. I know of a machine that included an arc-hyperbolic-cosecant instruction, but didn't include an arc-hyperbolic-secant function. Guess which trig functions appeared in the popular benchmarks.) The benchmark owners eventually mandated that the benchmarks be run with all optimizers turned off. -- Kevin Willoughby lid We'd spend the remaining time trying to fix the engine. -- Neil Armstrong |
#22
|
|||
|
|||
![]()
I could go on and on over this topic. Given the forum, let me just say
we essentially agree on all of this stuff. Jay Windley said: Right now Java costs me time. My Java programmers have to wait until a JVM becomes operational on platforms I build. That has to wait until the C/C++ environment is ready, at which point my C/C++ guys are off and running. I'm not surprised. One of the dirty secrets of Java is that most of the JVMs are coded in C. Can't start a new JVM until the C compiler is working well. So the JVM guys can't start working until the time when your C/C++ guys can also start working. ObSpace: I am, however, interested in Java being used on the new Mars probes. Is it written up anywhere in more detail? Not as much detail as I suspect you'd like. If you are a member of the Java Developers Community (or willing to register for the JDC), go to http://servlet.java.sun.com/javaone/...home/index.jsp and enter MARS into the search box. | Myself, I like blackboard and chalk. Just TRY to find an honest-to-goodness chalkboard anymore. I hate whiteboards; not enough resistance to the stroke. Also, getting chalk dust off my pants is trivial, getting those damn marker inks off my pants is tough. -- Kevin Willoughby lid We'd spend the remaining time trying to fix the engine. -- Neil Armstrong |
#23
|
|||
|
|||
![]()
(Replies consolidated to reduce off-topicness)
"Kevin Willoughby" wrote in message ... | | A large dose of engineering good taste is needed to be sure | you don't loose more than you gain in dynamic optimization. Yes, thank you. I was going to allude to this eventually. Static or dynamic, an optimizer will always have the disadvantage of not knowing the problem you're trying to solve. It can do lint-picking things like strength reduction or factoring out invariants, or consolidating similar code as you brought up. But the greatest increases in efficiency that I've seen -- and I mean they're *big* wins -- have always been from skilled programmers figuring out better ways to do things at the bird's-eye level with knowledge of what each modular chunk of code is supposed to accomplish. Funny how it always comes back to having skilled people whose understanding is focused on the problem rather than on the tool. I run into this all the time. People think in terms of what's available to them and what they can do with it, not in terms of what you need to solve the problem. | ... With most C/C++ systems, this would be a machine-code | to machine-code optimizer, with the advantage of being usable | with any language that compiles to machine code. Most compilers you buy will optimize both at the abstract code level and at the machine code level. These are the compilers sold by the CPU manufacturers. In the cases I've tested they produce much better code than freebies like GNU's compiler. Remember, my customers write code that has to run for several days on terascale systems. A 10% speedup is not insignificant. | Actually, the benchmarking people were interested in it because | the compiler writers optimized their products for best benchmark | numbers, resulting, as you say, in optimizing away entire loops. Well, I don't put a lot of stock in benchmarks, especially those done by manufacturers of either hardware or compilers/runtimes. I always find it interesting in the Java versus C debate that the C people's benchmarks come out faster for C while the Java people's benchmarks come out faster for Java. Again, the spectre of the skilled programmer raises its head. The only benchmark I pay attention to is LINPACK because it's a standard in the supercomputing industry. And pretty much anything goes. I've got a guy whose only job is to hand-optimize math libraries for these beasts. He can sometimes squeeze 20% speedups out of that code, which pushes our benchmarks along nicely. And we use compilers provided by the CPU manufacturers with all the recommended optimizations enabled. But what I meant was that the loop in question wasn't interesting because it was, in fact, so trivial. The failure of one compiler to optimize it to the bit bucket isn't that big a deal in the grand scheme of things. I certainly don't mean to say that factorization of loop invariants is not interesting, nor that elimination of dead loops is not interesting. "Kevin Willoughby" wrote in message ... | I could go on and on over this topic. Given the forum, let me | just say we essentially agree on all of this stuff. Yeah, I think we're wearing out our welcome. I don't mind Java being pitched for things that it's never been used for before. I do mind Java being pitched for everything. | I'm not surprised. One of the dirty secrets of Java is that | most of the JVMs are coded in C. I never considered it that much of a secret. I worked with Sun's original JVM that was *very poorly* coded in C. I *really* hated that code and so did everyone else that touched it. I think that was one of the big reasons Java didn't have immediate appeal. | Not as much detail as I suspect you'd like. If you are a member of the | Java Developers Community (or willing to register for the JDC), go to | http://servlet.java.sun.com/javaone/...home/index.jsp | and enter MARS into the search box. LOL, I'll get one of our Java guys to do it. Thanks. I've worked alongside several projects to embed Java, none of which came to fruition. I'd like to see a success story. | Also, getting chalk dust off my pants is trivial, getting those damn | marker inks off my pants is tough. Here's a tip (pun intended). Make this a tight "basic block" in your whiteboard presentations: 1. Remove cap 2. Draw on whiteboard 3. Replace cap Not only will it keep your clothes cleaner, the pens will last longer. Nothing irritates me more than an enfeebled whiteboard marker, except for people who stand there for five minutes talking while the cap is off the pen. They *dry out*, people! -- | The universe is not required to conform | Jay Windley to the expectations of the ignorant. | webmaster @ clavius.org |
#24
|
|||
|
|||
![]()
On or about Thu, 17 Jul 2003 22:44:39 -0400, Kevin Willoughby
made the sensational claim that: On of my pet peeves: people who mash the marker's point into the whiteboard so that is has the consistency of overcooked spaghetti. Ya just can't do a drawing with a blunt, mushy marker. *sniff sniff* Wazzat you say? -- This is a siggy | To E-mail, do note | This space is for rent It's properly formatted | who you mean to reply-to | Inquire within if you No person, none, care | and it will reach me | Would like your ad here |
#25
|
|||
|
|||
![]() "rk" wrote in message ... | | What did he do on the AP-101? Writing assemblers and compilers for it. I don't know if he did any direct support work for the shuttle. He was working for IBM at the time, but I don't know who else might have been using the -101 while he was there. -- | The universe is not required to conform | Jay Windley to the expectations of the ignorant. | webmaster @ clavius.org |
#26
|
|||
|
|||
![]() "Kevin Willoughby" wrote in message ... | | Yah, but the hand that holds the cap will get brightly colored | splotches. Better the hand than the pants. Or the white shirt. | On of my pet peeves: people who mash the marker's point into the | whiteboard so that is has the consistency of overcooked spaghetti. Agreed. But around here they tend to dry out before succumbing to tenderization. The other nice thing about chalk is that you can use the same rotation technique as for pencil to assure consistent line weight. I like CAD. I'm commited to CAD. I've evangelized CAD. I've built CAD. But I still like the feel of pencil on vellum. -- | The universe is not required to conform | Jay Windley to the expectations of the ignorant. | webmaster @ clavius.org |
#27
|
|||
|
|||
![]()
"Jay Windley" writes:
And that was my understanding of what this thread is about (or rather, what it has become). It's less about Java versus C or FORTRAN and more about correct understanding of underlying principles and basic concepts. Today's grads are being insulated from concepts that are still important. Agreed. I'm sure we all have a story we can tell about paying for something we bought with cash, something unexpected happens, and all of a sudden the cashier simply can't make change for you because of "a problem with the register". The real problem is that the person running the cash register has no clue how to make change on their own. We're turning out grads (at all levels) that are entirely dependent on computers to do this sort of work for them. Jeff -- Remove "no" and "spam" from email address to reply. If it says "This is not spam!", it's surely a lie. |
#28
|
|||
|
|||
![]()
On Fri, 18 Jul 2003 10:46:55 -0600, "Jay Windley"
wrote: I like CAD. I'm commited to CAD. I've evangelized CAD. I've built CAD. But I still like the feel of pencil on vellum. Or the look of India ink in a ruling pen going onto creamy drafting paper. Mary -- Mary Shafer Retired aerospace research engineer "A MiG at your six is better than no MiG at all." Anonymous US fighter pilot |
#29
|
|||
|
|||
![]()
In article ,
Mary Shafer wrote: On Fri, 18 Jul 2003 10:46:55 -0600, "Jay Windley" wrote: I like CAD. I'm commited to CAD. I've evangelized CAD. I've built CAD. But I still like the feel of pencil on vellum. Or the look of India ink in a ruling pen going onto creamy drafting paper. Mary When I was a freshman engineering undergrad (1986 - 1987) we were required to take two quarters of Engineering Graphics, which at that time still meant basic drafting. The classes were a bit of a rarity in that they were four hour classes and actually met four mornings a week. Day after day we'd all sit around drafting tables and learn to letter properly; how to properly dimension drawings; how to derive perspectives and elevations, etc. By the time I'd graduated and gone to work on Space Station Freedom, Boeing had almost entirely eliminated manual drafting. Due to an MSFC requirement (to help a local business, of course!) we were using Intergraph Unix-based workstations running their I/EMS software (on machines with a then-generous 16 megabytes of RAM - about a year later Intergraph was in the midst of upgrading the machines to an astounding 48 megs each! One of the most interesting things about the Intergraph system was that even then they were capable of being clustered to perform detailed 3D renderings using spare machine cycles - very common in redering farms now but amazing new technology to us junior engineers. Some of the models were detailed enough that one master machine and the spare cycles of two or three dozen others took two weeks or more to render. This was Boeing's first "paper-free" design - everything from the pressure vessel to the fluid lines were modeled in 3D and the drawings generated from the models. Interestingly, a couple years after the start of the SSF contract when the company started the Triple-7 program, they chose CATIA instead of I/EMS . . . ;-) -- Herb Schaltegger, Esq. Chief Counsel, Human O-Ring Society "I was promised flying cars! Where are the flying cars?!" ~ Avery Brooks |
#30
|
|||
|
|||
![]()
Bruce Palmer wrote in message t...
Mike Speegle wrote: Even with calculators kids struggle. Last week at the movies I bought something at the counter for $3.25. Gave the kid 3 ones and while I'm fishing in my pocket for change he enters $3.00 tendered and the display reads $.25 still due. I give him 3 dimes and he keys in $3.30 tendered with $3.05 in change. ??? He actually counted out 3 ones but I saved his butt and just took the nickel shaking my head. Sheesh. So even with electonic help some of these kids are seriously polluting the gene pool. :-( And to think baseball pitcher Mike Hampton left New York for the Rockies because he liked the Colorado school system better ![]() But seriously, here on Long Island if the cash registers didn't figure out the change, 99% of the kids you run into couldn't do it themselves. I can recall, not terribly long ago although it seems like it, a summer student we had (4th yr Mech Eng, OK, I _was_ having an affair with her but I wasn't her supervisor) who came to me with a problem and I hand-estimated a square root (casting out 9's method, usually gives you a decent value) and I had to explain to her what it was: the implication being that without calculators (didn't have mine at work that day) she was lost. So, then, what ARE they teaching engineers, or high school students for that matter, in maths class these days ? BTW, it all ended amicably and I attended her wedding in France a few years later. Cheers all, |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
New Orbiter Release | Robert Conley | Space Science Misc | 0 | November 6th 03 06:42 PM |
Mercury 4.5 for Orbiter released | Robert Conley | Space Science Misc | 2 | August 30th 03 04:40 AM |
Columbia Investigators Fire Foam Insulation at Shuttle Wing, Blowing Open 2-Foot Hole; The crowd of about 100 gasped and cried, "Wow!" when the foam hit. | Jay | Space Shuttle | 32 | July 12th 03 02:41 AM |