News for hackers. Stuff that matters.
Re:The slow currentTimeMillis() by empath75 on Friday August 04, 2017 @08:21AM (#14928125)
It's sort of amazing that 600 ns is considered slow.
Re:The slow currentTimeMillis() by ptero on Friday August 04, 2017 @09:05AM (#14928345)
For many of the things we work on, this is not just slow, it is atrociously slow. For analysis of real-time systems I want to put many data tap points throughout the processing chain. If I add 50 (not uncommon), at 5ns a pop most systems (again, IME) are not going to care about 0.25 microsecond extra latency. At 600ns I add 30 microseconds to their processing chain and will likely have to spend some of my time explaining to the owners why my tap points will not affect the system I am helping fix.
Re:The slow currentTimeMillis() by Sharlin on Friday August 04, 2017 @08:33AM (#14928189)
It's all relative. It may sound fast but on the other hand it's less than two million times a second. There are many cases where spending an extra 600ns in a tight inner loop would absolutely obliterate a program's performance, whereas an implementation taking just 3ns would not.
Re:The slow currentTimeMillis() by sinaa on Friday August 04, 2017 @08:35AM (#14928199)
Compared to 4 ns on Windows, many calls to the method can create significantly different performance profiles across the platforms.
Re:The slow currentTimeMillis() by omgtehlion on Friday August 04, 2017 @11:32AM (#14929429)
if you do e.g. HFT, additional 600ns might kill you