SitePoint Sponsor

User Tag List

Page 6 of 8 FirstFirst ... 2345678 LastLast
Results 126 to 150 of 190
  1. #126
    SitePoint Addict timvw's Avatar
    Join Date
    Jan 2005
    Location
    Belgium
    Posts
    354
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Ren
    Not always, assembly language is not converted to an intermediate form.
    Afaik, assembly language is translated into machinecode..

  2. #127
    SitePoint Wizard Ren's Avatar
    Join Date
    Aug 2003
    Location
    UK
    Posts
    1,060
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by timvw
    Afaik, assembly language is translated into machinecode..
    Hmm, wouldn't call machine code "intermediate form" as that implies there is something else its get translated into.

  3. #128
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    > assembly language is translated into machinecode..

    That is true, pretty much so; Anything below that then you are talking electrical signals I suppose

    > Hmm, wouldn't call machine code "intermediate form" as that implies there is something else its get
    > translated into.

    I think the point being made, is that for the human it's easier to work with assembler, than it is to work at the machine level; Machine code is basically hexadecimal codes that represent their binary form, ie

    Code:
    #c9 201 ret
    Which is better... Hexadecimal - or just decimal if you prefer - or assembler...

  4. #129
    Employed Again Viflux's Avatar
    Join Date
    May 2003
    Location
    London, On.
    Posts
    1,130
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I prefer to code in binary. It's a pain to debug, but the speed is blistering.

  5. #130
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    11001001

  6. #131
    SitePoint Guru
    Join Date
    Nov 2002
    Posts
    841
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There are 10 kinds of programers. Those who can count in binary and those who can't.

  7. #132
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Which kind of leaves you -BEEP- basically, as counting in binary amounts to base 10 anyways... For those who are looking for an arguement though, hexadecimal isn't counted by a group of 8 binary digits, it's counted in a group of four, for those who don't know

  8. #133
    SitePoint Evangelist ikeo's Avatar
    Join Date
    Oct 2004
    Location
    Austin Texas
    Posts
    591
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Glad to see we're all still on topic :]

    Quote Originally Posted by Dr Livingston
    Which kind of leaves you -BEEP- basically, as counting in binary amounts to base 10 anyways... For those who are looking for an arguement though, hexadecimal isn't counted by a group of 8 binary digits, it's counted in a group of four, for those who don't know

  9. #134
    SitePoint Addict gl3nnx's Avatar
    Join Date
    May 2005
    Location
    at http://www.gl3nnx.net
    Posts
    344
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    for me PHP still the best!

  10. #135
    SitePoint Guru thr's Avatar
    Join Date
    Jun 2003
    Location
    Sweden
    Posts
    664
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by BerislavLopac
    Originally it was called "Personal Home Page Tools".
    Yes I know, but it's not any more is it?

  11. #136
    SitePoint Enthusiast Webmaster7's Avatar
    Join Date
    Jan 2006
    Posts
    82
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Java is still too heavy for any normal system. And I'm not just talking about RAM use.
    PHP is still my number one choice.

  12. #137
    SitePoint Guru
    Join Date
    Feb 2006
    Location
    Pittsburgh, Los Angeles
    Posts
    706
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Java is still too heavy for any normal system. And I'm not just talking about RAM use.
    You have no idea what you are talking about. Speak from experience not.....you know.

  13. #138
    SitePoint Guru rockit's Avatar
    Join Date
    Sep 2005
    Location
    Canada
    Posts
    637
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i guess to add fuel the to fire, how would one compare tomcat JSP vs. PHP?

  14. #139
    SitePoint Guru
    Join Date
    Feb 2006
    Location
    Pittsburgh, Los Angeles
    Posts
    706
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    how would one compare tomcat JSP vs. PHP?
    Compare them in what sense? In terms of memory usage? Speed? Given the topic of the thread I'll assume you mean speed. From my experience JSP (in tomcat or another servlet container) is dramatically faster than PHP out of the box (i.e. with no opcode caching etc). If you use some opcode cache with PHP then JSP ends up being around 10-50% faster (depending on what you are doing).

  15. #140
    SitePoint Addict Trent Reimer's Avatar
    Join Date
    Sep 2005
    Location
    Canada
    Posts
    228
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by rockit
    how would one compare tomcat JSP vs. PHP?
    I once did some basic benchmarks between popular platforms, including those two, and found that each had its own sweet spot.

    For simple stuff like inserting a few dynamic bits in a single page the fastest times were JSP on Resin server, followed by apache/mod_php and then Tomcat JSP and finally mod_perl. (RoR wasn't on the scene yet) Frankly differences were fairly moot. i.e. You probably wouldn't chose one of those technologies over the other based on speed.

    I didn't have eaccelerator or any other optimizer installed for PHP either so while it is likely you could tweak this test to put PHP on top by some tiny margin, JSP on Resin was awfully fast and even mod_perl was acceptible so who cares?

    I had another test (somewhat ridiculous) that processed enormous strings of several megabytes. Grandpa Perl tore through it like nothing even when entire 5MB+ strings were passed as single variables. PHP definitely lugged a bit. Java crashed.

    I rewrote that memory-hog script a few times to break down the variables into smaller units and once it got below a certain threshold Java was fine again. So you definitely have a memory cap there somewhere you need to be aware of. Of course you should be aware of memory use on any platform but I would be remiss not to point out that old man Perl kicked all the youngsters.

    There are enormous sites running on any of these technologies: Google uses Java and Python, Yahoo is using PHP, MSN uses ASP.NET, Slashdot uses Perl, ...and yet there are no end of fan boys willing to tell you technology X is the *only* one that can handle a serious situation. Go figure.

  16. #141
    SitePoint Guru
    Join Date
    Feb 2006
    Location
    Pittsburgh, Los Angeles
    Posts
    706
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I had another test (somewhat ridiculous) that processed enormous strings of several megabytes. Grandpa Perl tore through it like nothing even when entire 5MB+ strings were passed as single variables. PHP definitely lugged a bit. Java crashed.
    Conclusion from this: You don't know how to write java. Java does string processing just fast as perl, the only difference is doing it in java is a pain and its built into perl.

  17. #142
    SitePoint Addict Trent Reimer's Avatar
    Join Date
    Sep 2005
    Location
    Canada
    Posts
    228
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Snaily
    Conclusion from this: You don't know how to write java.
    That is indeed one valid conclusion. The other is that perl is less memory intensive.

  18. #143
    SitePoint Guru
    Join Date
    Feb 2006
    Location
    Pittsburgh, Los Angeles
    Posts
    706
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The other is that perl is less memory intensive.
    Java's VM takes up a bit more memory than Perls interpreter but the difference is in terms of kilobypes...not megabytes and therefore trivial. The problem was your code its really that simple. Java does not crash when processing 5MB+ of text.

    "Grandpa" Perl isn't faster than Java...doesn't use less memory....its not even in the same class as Java.

  19. #144
    SitePoint Guru BerislavLopac's Avatar
    Join Date
    Sep 2004
    Location
    Zagreb, Croatia
    Posts
    830
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Snaily
    "Grandpa" Perl isn't faster than Java...doesn't use less memory....its not even in the same class as Java.
    Well, I think this is indesputable then...

  20. #145
    SitePoint Addict Trent Reimer's Avatar
    Join Date
    Sep 2005
    Location
    Canada
    Posts
    228
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Snaily
    Java does not crash when processing 5MB+ of text.
    But it did crash. I have no doubt that you could build a competent Java program to blaze through that text in record time. In fact with a little rewriting even I the non-Java guy was able to get it going reasonably well. The point is the same inefficient code was passed to both environments and Perl tore through it while Java hung. The Perl code was certainly not optimized. This was not a comparison of best practices, it was a memory intensive test. I appreciate that Java is a more complete programming language than Perl, PHP or Python but scripting languages have their strengths too. In this case Perl handled sloppy, memory intensive string handling better than Java.

  21. #146
    SitePoint Guru
    Join Date
    Feb 2006
    Location
    Pittsburgh, Los Angeles
    Posts
    706
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    But it did crash. I have no doubt that you could build a competent Java program to blaze through that text in record time. In fact with a little rewriting even I the non-Java guy was able to get it going reasonably well
    Right...so the problem was your code.
    The point is the same inefficient code was passed to both environments and Perl tore through it while Java hung. The Perl code was certainly not optimized.
    No the "same" code was not passed to both environments...and that is just the problem. When you do benchmarks you must compare similar implementations...you can't do that if you don't know the two languages well. The last time I checked Perl and Java have very similar speeds as far as string processing goes. Although this isn't saying that much though as string processing for Java is a weakness.
    In this case Perl handled sloppy, memory intensive string handling better than Java.
    So then your only point is that it is easier to write string processing code in Perl (that doesn't suck)? Given the language was made for that....this is hardly suprising.
    Perl, PHP or Python but scripting languages have their strengths too
    They do... But the people that use them should not get upset at the idea that other languages like Java and .NET are faster.

  22. #147
    SitePoint Wizard
    Join Date
    Jan 2005
    Location
    Denmark
    Posts
    1,222
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    http://shootout.alioth.debian.org/gp...php&lang2=java

    Java does use more than PHP memory for most of the tested programs. Except for the regex test and reverse complement, java absolutely kills PHP. Looks like PHPs regex implementation is fairly good, though.

    I'll concede that virtually all of these tests are either very calculation intensive and/or very IO intensive. This may not automatically translate into faster web apps, but it certainly doesn't hurt Java to be faster at number and IO crunching.

    OpCode caching would not cause PHP to fare better in these tests, as it's a single run. OpCode caching merely mitigates the performance impact from having to parse/compile to opcode on each request.
    /mouse

  23. #148
    SitePoint Guru
    Join Date
    Feb 2006
    Location
    Pittsburgh, Los Angeles
    Posts
    706
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Looks like PHPs regex implementation is fairly good, though.
    The regex engine in PHP is done in C...so this would explain why its able to match Java in speed (and even do a bit better).

  24. #149
    Employed Again Viflux's Avatar
    Join Date
    May 2003
    Location
    London, On.
    Posts
    1,130
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In the grand scheme of a web request, the time spent at the server is but a fraction of the whole.

    It's like arguing about whether the Porsche or the Mercedes is faster, even though both are limited by the speed limit on the highway.

  25. #150
    SitePoint Enthusiast siteartwork's Avatar
    Join Date
    Jan 2005
    Location
    Germany
    Posts
    67
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Viflux
    In the grand scheme of a web request, the time spent at the server is but a fraction of the whole.

    It's like arguing about whether the Porsche or the Mercedes is faster, even though both are limited by the speed limit on the highway.

    I once had the chance to drive both of them. I had already driven a Mercedes before so I knew how to handle that car. I went really fast with it. The Porsche however was kind of unfamiliar to me, and it didn't took me long to crash into the next wall that came up...



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •