From: Chad Perrin Date: 2006-07-27T03:27:05+09:00 Subject: Re: For performance, write it in C On Thu, Jul 27, 2006 at 12:42:46AM +0900, David Pollak wrote: > Writing code that runs as fast in Java as it does in C is real work, > but it's possible. . . . the problem being that putting the same effort into optimizing a C program will net greater performance rewards as well. The only language I've ever seen stand up to C in head-to-head optimization comparisons with any consistency, and even outperform it, was Delphi-style Objective Pascal, and that's only anecdotal comparisons involving my father (who knows Delphi's Objective Pascal better than most lifelong C programmers know C), so the comparisons might be somewhat skewed. My suspicion is that the compared C code can be tweaked to outperform the Object Pascal beyond Object Pascal's ability to be tweaked for performance -- the problem being that eventually you have to stop tweaking your code, so sometimes the Object Pascal might be better anyway. Java doesn't even come close to that level of performance optimization, alas. At least, not from what I've seen. > > There are some applications that will never perform as in Java (e.g., > stuff that's heavily oriented to bit manipulation.) But for many > classes of applications (e.g., spreadsheets) Java can perform as well > as C. Is that heavily optimized Java vs. "normal" (untweaked) C? -- CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ] Brian K. Reid: "In computer science, we stand on each other's feet."