Re: GetTickCount() performance
From: Johan Nilsson (johan.nilsson_at_newsgroups.nospam)
Date: 11/17/04
- Next message: Johan Nilsson: "Re: GetTickCount() performance"
- Previous message: Jochen Kalmbach: "Re: Getting Calling Thread (DLL) Module Name"
- In reply to: Slava M. Usov: "Re: GetTickCount() performance"
- Next in thread: Slava M. Usov: "Re: GetTickCount() performance"
- Reply: Slava M. Usov: "Re: GetTickCount() performance"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 17 Nov 2004 10:59:55 +0100
"Slava M. Usov" <stripit.slough@gmx.net> wrote in message
news:uyn3yoMyEHA.3844@TK2MSFTNGP09.phx.gbl...
> "Johan Nilsson" <johan.nilsson@newsgroups.nospam> wrote in message
> news:OCwASKJyEHA.1452@TK2MSFTNGP11.phx.gbl...
> >
> > "Slava M. Usov" <stripit.slough@gmx.net> wrote in message
> > news:uIqwVHyxEHA.748@TK2MSFTNGP14.phx.gbl...
> > > "Jochen Kalmbach" <nospam-Jochen.Kalmbach@holzma.de> wrote in message
> > > news:Xns959D52CE7CBB1JochenKalmbachholzm@127.0.0.1...
> > >
> > > [...]
> > >
> > > > 3. If you want to measure short intervals, you should consider to
use
> > > > QueryPerformanceCounter/Frequency
> > >
> > > Which has horrible overhead.
> >
> > On uniprocessor machines, that is. Not sure about HT ones.
>
> Does not matter. It is always a trip to kernel mode and back, which is
> hundreds if not thousands of cycles.
Cycles apart, I made some testing in the past where the ratios were
approximately 1:10 for rdtsc vs QPC on SMP and 1:80 for rdtsc vs. QPC on
uniprocessor. I'd say the difference matters depending on your requirements,
even if rdtsc clearly outperforms QPC in all cases.
// Johan
- Next message: Johan Nilsson: "Re: GetTickCount() performance"
- Previous message: Jochen Kalmbach: "Re: Getting Calling Thread (DLL) Module Name"
- In reply to: Slava M. Usov: "Re: GetTickCount() performance"
- Next in thread: Slava M. Usov: "Re: GetTickCount() performance"
- Reply: Slava M. Usov: "Re: GetTickCount() performance"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|