On Wed, Nov 4, 2009 at 9:12 PM, Shino Jacob <[email protected]> wrote: > > <quote> > Do you mean that your program did not finish and ate up all the CPU > time? Isn't that normal (unless you have a multi processor system and > the OS shares the load)? > Anyway, try the same program in C or C++ on the same machine and see how > that goes. > </quote> > > A 1 billion iteration completed using a java program in around 4.5 seconds. > I should have mentioned it in the first posting itself. > > In my experience user space code can bring down the entire OS, > (Solaris on sparc to be specific.) > > below given is the code in python, I dont have the guts to run it one > more time. > k=0 > for x in range(1,100000000): > k =k+1;
Try xrange. Regards Rajeev J Sebastian --~--~---------~--~----~------------~-------~--~----~ "Freedom is the only law". "Freedom Unplugged" http://www.ilug-tvm.org You received this message because you are subscribed to the Google Groups "ilug-tvm" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For details visit the website: www.ilug-tvm.org or the google group page: http://groups.google.com/group/ilug-tvm?hl=en -~----------~----~----~----~------~----~------~--~---
