Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^7: Perl and C# - how I use both

by deliria (Chaplain)
on Mar 11, 2009 at 09:39 UTC ( #749824=note: print w/replies, xml ) Need Help??


in reply to Re^6: Perl and C# - how I use both
in thread Perl and C# - how I use both

I was actually interested in an answer to tilly's question. What is it that makes .Net better for you than the JVM with regards to performance / memory use? Because I haven't seen extreme differences in my situations either.

Replies are listed 'Best First'.
Re^8: Perl and C# - how I use both
by jdrago_999 (Hermit) on Mar 11, 2009 at 18:37 UTC
    I was actually interested in an answer to tilly's question. What is it that makes .Net better for you than the JVM with regards to performance / memory use? Because I haven't seen extreme differences in my situations either.

    Here's an experiment.

    1. Configure your Windows machine to turn on IIS, running a simple website (i.e. an email form).
    2. Restart Windows, access the website and take a note of your system resource usage.
    3. Disable IIS.
    4. Create the same setup using JBoss.
    5. Restart Windows, access the Java version of the website and take a note of your system resource usage.

    In all fairness, since this is Windows we're talking about, and there could be special optimizations in Windows to help IIS + .Net work better on Windows than JBoss/Tomcat/BEA Weblogic/Websphere/etc on Windows — go ahead and repeat the Java experiment on Sun Solaris on a Sunfire server instead (with that extra cash hanging out under your sofa cushions).

    I wasn't able to perform the experiment on a Sunfire server with Solaris (no extra dough) but on my laptop (2Ghz dual-core prod with 4Gb RAM) I saw 3x more RAM used by the Java setup than the IIS setup.

    I could start ranting about how I think Java development is mostly a PITA and should be much easier (look at how simple the language is, for God's sake) — but I won't. Strictly looking at resource usage, ASP.Net is clearly the winner when we look at an out-of-the-box configuration. For .Net, this includes JIT-compiling, for Java it does not. Maybe that's why. Maybe it's the stack-based VM vs the heap-based VM. Maybe it's just that the CLR is more modern and builds on the successes and failures of the JVM in a way that the JVM can't.

    I don't know why - I didn't write either VM and certainly won't be writing one anytime soon :-). All I know is that the time it takes me to write something extremely common, say — an email form that allows a file attachment and includes a CAPTCHA — takes about an hour or so with .Net and might take me a couple days with Java. This probably says more about my Java skills than the tools themselves, but the fact that ASP.Net comes with easy file-upload capabilities right out of the box and JSP doesn't (AFAIK) says something.

    IRONY: Discussing ASP.Net and Java on Perlmonks.

Re^8: Perl and C# - how I use both
by weismat (Friar) on Mar 11, 2009 at 16:51 UTC
    No Java expert, but I think that C# has advantages because of the following point:
    - lightweight objects can be allocated on stack instead of heap and are value types instead of references
    - Java VM needs more tweaking of GC parameters to avoid long GC for bigger programs

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://749824]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2021-12-05 02:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    R or B?



    Results (31 votes). Check out past polls.

    Notices?