Slashdot Mirror


The End of Native Code?

psycln asks: "An average PC nowadays holds enough power to run complex software programmed in an interpreted language which is handled by runtime virtual machines, or just-in-time compiled. Particular to Windows programmers, the announcement of MS-Windows Vista's system requirements means that future Windows boxes will laugh at the memory/processor requirements of current interpreted/JIT compiled languages (e.g. .NET, Java , Python, and others). Regardless of the negligible performance hit compared to native code, major software houses, as well as a lot of open-source developers, prefer native code for major projects even though interpreted languages are easier to port cross-platform, often have a shorter development time, and are just as powerful as languages that generate native code. What does the Slashdot community think of the current state of interpreted/JIT compiled languages? Is it time to jump in the boat of interpreted/JIT compiled languages? Do programmers feel that they are losing - an arguably needed low-level - control when they do interpreted languages? What would we be losing besides more gray hair?"

7 of 1,173 comments (clear)

  1. Java and Mac OS X by Kelson · · Score: 4, Informative

    Mac OS X treats Java as just another app framework, equivalent to Cocoa or Carbon. (I'm fairly certain I've seen an older version of that diagram that also listed Classic in that layer.) I imagine they've done a bunch of optimizations to tie it into the system, though I don't know whether it launches the runtime at boot or not. You've probably noticed that on Mac OS, you get your Java runtime from Apple, not from Sun or IBM.

    The downside is that things don't work quite the same as they do in Sun's Java runtime, so there are differences between Java-on-Windows and Java-on-Mac. For instance, my wife is an avid Puzzle Pirates player, and the game client is a Java app. There've been Mac-specific bugs in the past, and at one point a major slowdown appeared when the game was run on a Mac. It hasn't been fixed, so while she can still do crafting on the Mac, whenever she does anything multiplayer, she has to switch to the Windows box.

  2. Re:Negligleable performace hit my... by NutscrapeSucks · · Score: 4, Informative

    Let me add some content to your Apple advertisement :)

    Apple's JVM implementation has something called Class data sharing to speed Java startup after the first invocation. The first time is just as slow as always. Since then the feature has been added to Sun Java 1.5, so if you're up to date, you should have this.

    --
    Whenever I hear the word 'Innovation', I reach for my pistol.
  3. Re:Have you tried coding anything hard? by kpharmer · · Score: 5, Informative

    > When your web-based-datastore gets 50,000 inserts per second, hovers between 15 and 20 billion rows and endures a sustained query rate
    > of 43,000 queries per hour, tell me which part of it you want to coded in PHP.

    hmm, the warehouse I work on has multiple databases with billions of rows in them, can hit insert rates of 100,000 rows a second, can experience 60,000 queries/hour - many of which are trending data over 13 months, has hundreds of users. Many of these users are allowed to directly hit some of the databases with whatever query tool they want. Scans of a hundred million rows at a time aren't uncommon (though seldom happen more than a few dozen times a day).

    This app is completely written in korn shell, python, php and sql (db2). Looks like Ruby is also coming into the picture now, will probably supplant much of the php in order to improve manageablity.

    Oh yeah, and the frequency of releases is quick and it's defect rate is low. And we're planning to begin adding over 400 million events a day soon. I've done similar projects in C and java. Never anywhere near as successfully as in python and php.

    We might consider rewriting a few select python classes in c. Maybe, if we port the ETL over to the Power5 architecture with psycho doesn't run. Otherwise, it's cheaper to just buy more hardware at this point - since each ETL server can handle about 3 billion rows of data/day with our python programs.

  4. Re:Its inevitable by lbrandy · · Score: 4, Informative

    If you mean a compiler that takes simple linear code and magically makes it run faster on a massively parallel architecture, I'd be very interested in an argument for how that's even logically possible.

    It's done by changing the paradigm. Stream programming, for one? You don't "magically" take linear code and make it fast. You get rid of "linear code". Linear code goes the way of the goto instruction... Very little of the computational heavy lifting is truely and unavoidably "linear".

  5. PHP vs ASP vs C++ vs JavaScript by PassMark · · Score: 4, Informative

    We wrote the same search engine code in 4 languages, PHP, ASP, C++ & JavaScript. The results are published here, http://www.wrensoft.com/zoom/benchmarks.html

    In summary, C++ was 4 times faster than PHP, and in turn PHP was 3 times faster than ASP and JavaScript was truly appalling. I can't think of many applications that wouldn't benefit from being 4 to 12 times faster.

  6. Re:What?!?!? by atrus · · Score: 4, Informative

    Half of what you want is in the C++ STL.

    And no, the STL does not suck.

  7. Re:What?!?!? by masklinn · · Score: 4, Informative

    C is a lot easier to debug

    In which frigging paralell universe are you living please? I want to go there. C being orders of magnitude faster than interpreted languages I agree with, but C easier to debug? Either you've never tried interpreted languages (say Python or C#, PHP is not a language) or you never got past "hello world" (hell, even hello world is harder to debug in C).

    • Open source
    • Written in C (or minimally-invasive C++ with standard C bindings)
    • Solid regular expression integration
    • Ability to obtain a standard C string representation with little or no penalty (to interface with legacy APIs)
    • Reasonable error checking and reporting throughout the API for maximum security and debuggability
    • Explicit retain/release, with automatic retain on allocation, instant destruction on final release---none of this garbage collection crap....
    • Standard CGI parse code built on top of them (with get/post variables in a hash, for example)

    In a word, you want D.

    Or another nice high-level compiled language. Most of them are functional though (Haskell, *ML) so you may have some trouble adapting. And they usually don't allow variable-length strings, being functional and all.

    --
    "The way we can tell it's C# instead of Haskell is because it's nine lines instead of two." -- wadler