turbo pascal 5.5
nipsonanomimata
Posts
-
Ok Which was very your first programming language? -
array sort performance java vs .net c#how can i check how much ram is my java-runtime allowed to access? i just installed the jdk1.7 , and build the code using netbeans 7.01
-
array sort performance java vs .net c#import java.util.Arrays;
import org.apache.commons.lang.time.*; //
StopWatch api downloadruns 4 times slower than the .net c# code!
what am i missing? what can i do to improve performance? is this interesting? I am familiar with c# but i wand to deep dive in java
to broaden my knowledge on languages and frameworkshere is the code in c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;namespace ConsoleApplication4
{
class Program
{
static void Main(string[] args)
{
Random r = new Random();
int[] stuff = new int[100000];
//int[] stuff = new int[] {4, 7, 2, 0, 9, 1, 6, 7, 5, 4, 3, 8, 6};
System.Console.WriteLine("Unordered array....:");
for (int i = 0; i < stuff.Length; i++)
{
stuff[i] = r.Next(100000);
System.Console.Write(stuff[i].ToString() + " ");
}Stopwatch watch = new Stopwatch(); watch.Start(); Array.Sort(stuff); watch.Stop(); System.Console.WriteLine("Ordered array....:"); for(int k=0;k