[Mesa-dev] [PATCH 2/2] gallium/os: fix os_time_get_nano() to roll over less

Jose Fonseca jfonseca at vmware.com
Fri Aug 18 10:47:06 UTC 2017


On 18/08/17 08:23, Frank Richter wrote:
> Hi,
> On 17.08.2017 02:34, Brian Paul wrote:
>>> BTW, I wonder if we would win by using lldiv().  Because this is often
>>> use for performance measurements, so these extra division might add some
>>> impact.
>>
>> Frank, do you want to look into that?  In the mean time, I'll push the 
>> patches as-is.
> 
> AFAICS, the lldiv implementation in the MSVC runtime (also used by 
> MinGW) simply does “a = num / denom; b = num % denom;” as well, so it 
> seems unlikely that lldiv() would give a benefit here.

I see.  I thought they would try do something smarter to leverage the 
ISA ability to compute both at the same time, but I suppose that's left 
to the compiler to figure out.  Thanks for checking.

Jose


More information about the mesa-dev mailing list