Initialization Code Runtime Reduction Effort

Fragment of a discussion from Talk:XanderCat
Jump to navigation Jump to search

Some thoughts...

  • For what it's worth, I tried to generate different CPU constants based on whether it was dynamic overclocking or not, but wasn't able to. Maybe the trigger threshold is well below what a single Robocode instance or the CPU constant calculation uses on my machine.
  • While Robocode does use multiple threads - you might see 50% on two cores or 100% on one core - it only uses 1 at a time, so I'm not sure it's ever really stealing CPU.
  • Since a lot of modern multi-core processors include hyperthreading, there should be some extra buffer such that using 1 Robocode per core is ok.

To me, the bigger problems are:

  • Measuring CPU time for a single tick in nanoseconds is not nearly as accurate as we need it to be.
  • There's always other system stuff that could use some CPU. Combine with the lack of accuracy and it's really dangerous to penalize for taking too long over a timeframe of just one tick.
Voidious23:59, 16 February 2013

Hmm, maybe I'm wrong and System.nanoTime() is accurate enough... [1]

Voidious00:09, 17 February 2013