ShadowFax
ShadowFax

Reputation: 95

Serialization Benchmark

I'm writing a benchmark for computing the time taken for serialization/de-serialization for OpenFast

The question is when I'm computing the time taken, should I also take into account the time taken for parsing and setting the values for fields and also the same while de-serialization.

I'm writing it in java so what accuray is good Nano or Milli? Are there any issues in nano second computation that I should be worried about?

Thanks.

Upvotes: 0

Views: 296

Answers (1)

Joffer
Joffer

Reputation: 1939

From Effective Java, Edition 2, Item 69:

For interval timing, always use System.nanoTime in preference to System.currentTime- Millis. System.nanoTime is both more accurate and more precise, and it is not affected by adjustments to the system’s real-time clock.

Upvotes: 1

Related Questions