Skip to main content

Timeline for Project Euler #2 in Java

Current License: CC BY-SA 3.0

8 events
when toggle format what by license comment
May 28, 2015 at 3:39 history edited JS1 CC BY-SA 3.0
Modified both original and new program to measure the end time before the call to println(), to be more precise.
Dec 23, 2014 at 18:02 comment added Boris the Spider @DoubleDouble a combination of both. It's very hard to benchmark effectively as the JVM has a habit of loading classes and JITing things as it goes. Even with warmup, there is no guarantee that the JVM won't decide to load/compile a whole host of seemingly unrelated stuff randomly. A benchmarking tool like caliper will actually monitor the activity of the underlying JVM to deal with these issues.
Dec 23, 2014 at 17:11 vote accept TheCoffeeCup
Dec 23, 2014 at 15:55 comment added DoubleDouble @rolfl Is it the timing mechanism itself or would he want move his code to a method, call the method a few times to "warm-up" then start the timer and use that result? Is this because of memory caching or is there more to it?
Dec 23, 2014 at 13:14 comment added rolfl It should be pointed out that the timing mechanism used for measuring this performance is essentially useless... micro-benchmarking on code that has not 'warmed up' leads to misleading diagnostics
Dec 23, 2014 at 12:25 comment added RubberDuck Wow. I'm a little surprised at the dramatic difference. Goes to show that what's easier for a person isn't always easier for a machine.
Dec 23, 2014 at 6:22 comment added gengkev Agreed; the explicit mathematical formula is more elegant, but for a computer, it's more difficult to calculate.
Dec 23, 2014 at 5:11 history answered JS1 CC BY-SA 3.0