Inline get_cycles_now if rdtsc is available.

Description

I experimented with inlining get_cycles_now(), so that it unconditionally called getTSC() (avoiding a call and a boolean test).

My test case was an inline datset->count, so not much other work going on, but I was surprised to find that it reduced the time by 3%, so it is likely to be worth adding this as a compile option.

Conclusion

None

Activity

Show:

Richard Chapman February 5, 2016 at 4:15 PM

Richard Chapman December 15, 2015 at 2:21 PM

What happens on VMs ?

Gavin Halliday December 15, 2015 at 2:03 PM

There is a potential problem unconditionally inlining the function since it means that a feature of that target platform will be determined at compile time.

RDSTC with a constant rate is supported on Xeons from ~2005, and AMD K10 from ~2008, so it is unlikely to cause problems on any systems that HPCC is being run on.

To help avoid any issues the PR will contains an option USE_INLINE_TSC which can be used to disable the feature.

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Components

Assignee

Reporter

Priority

Fix versions

Created November 25, 2015 at 3:41 PM
Updated February 5, 2016 at 4:15 PM
Resolved February 5, 2016 at 4:15 PM