Re: crushing java

From: Lloyd Dupont (ld_at_NewsAccount.galador.net)
Date: 06/17/04


Date: Thu, 17 Jun 2004 20:10:13 +1000

of course the compiler don't just remove a call.
it's incorrect to remove a function call !
at most does it inline it.
your reaction just proved you to be sentimental and self blinded

anyway, this proof can be canceled by another similar test:
using System;

public class ExceptPerf
{
  public static void Main(string[] args)
  {
   int N = int.Parse(args[0]);
   long t0 = Environment.TickCount;
   for(int i=0; i< N; i++)
     try{
      throw new Exception();
     }catch( Exception e )
     {
      ;
     }
   Console.WriteLine((Environment.TickCount-t0));
  }
}

public class ExceptPerf
{
  public static void main(String[] args)
  {
   int N = Integer.parseInt(args[0]);
   long t0 = System.currentTimeMillis();
   for(int i=0; i< N; i++)
     try{
      throw new Exception();
     }catch( Exception e )
     {
      ;
     }
   System.out.println((System.currentTimeMillis()-t0));
  }
}



Relevant Pages

  • Re: [Newbie] Reading & Writing Objects To File
    ... | java.io.StreamCorruptedException exception. ... |>> public static void main(Stringargs) ... |>> new CardCreatorDump(); ...
    (microsoft.public.dotnet.vjsharp)
  • Re: crushing java
    ... your reaction just proved you to be sentimental and self blinded ... public static void Main(stringargs) ... }catch(Exception e) ...
    (microsoft.public.dotnet.framework)
  • Re: I need to know if a java class import a package
    ... to test if they can iterate an order an array by themselves). ... public static void main(Stringargs) throws Exception { ...
    (comp.lang.java.programmer)
  • Re: problem...sorry my first time with java
    ... public static void main{ ... java cl_gm ... the String array passed to the main method as args[] will be empty, ... You may wish to familiarise yourself with the javadoc for the exception ...
    (comp.lang.java.help)
  • RE: Biztalk 2006 Tutorial 3
    ... Exception type: ServiceCreationException ... Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession._createOrRehydrateRealService(Guid& instanceId, IBTMessage currMsg) ... md, Objectargs, Object server, Int32 methodPtr, Boolean fExecuteInContext, ...
    (microsoft.public.biztalk.general)