Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: d9d614a4d0662c2d573418622db9ed041f94a8c1
Ticket: 1353858fffffffffffffffffffffffffffffffff
windows: timing granularity is poor on many systems
User & Date: kennykb on 2005-11-11 21:38:57
Changes

  1. icomment:
    Logged In: YES 
    user_id=99768
    
    Matt,
    
    I'm not quite willing yet to give up on the 
    performance counter - simply because it's 
    the only timing reference with sub-millisecond 
    precision that we have.  As I read your patch, 
    it rolls back to a state where 
    [clock clicks -microseconds] returns something 
    precise only to the millisecond - and moreover, 
    on most machines, accurate only to the video 
    frame.  For profiling, that's a horrible price to pay.
    
    I'm most definitely willing - indeed, eager - to
    add the multimedia timer approach on systems
    where the performance counter does not pass
    the tests.  Doing that would at least give us a
    consistent timing reference on those machines.
    
    But I'm more concerned about the MP machines
    that "fail" the tests. My understanding of the
    situation is that machines on which the performance
    counter is unreliable are actually rare, and the tests
    are quite over-conservative-- excluding all MP
    machines except for GenuineIntel hyperthread.
    I suspect that a few extra tests for machines on which
    the perf counter is "safe" may well cover your
    production machines.  I've actually encountered
    only a couple of machines on which the vendor got
    it wrong, and they are rather antiques now.
    
    Have you tried simply patching out the checks for
    perf counter frequency (the block of code conditioned
    on "#if !defined(_WIN64)")?  If so, what were the results?
    My suspicion is that on modern machines, that may well
    Just Work - and in that case, we'd win simply by making
    the checks within that block more permissive.
    
    
  2. login: "kennykb"
  3. mimetype: "text/plain"
  4. username: "kennykb"