Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encoding time incorrect on multicore machine #19

Open
cwoffenden opened this issue Sep 21, 2022 · 0 comments
Open

Encoding time incorrect on multicore machine #19

cwoffenden opened this issue Sep 21, 2022 · 0 comments

Comments

@cwoffenden
Copy link

cwoffenden commented Sep 21, 2022

I'll update this more when I've tested on other platforms. Running on Debian I'm seeing this:

Total encoding time: 32.043268 secs
Total processing time: 32.212762 secs

But the actual run was much, much faster. If I time the run (with time) I see:

real	0m2.503s
user	0m57.651s
sys	0m4.223s

The 2.5 seconds of wallclock time feels correct (this is a 144-core machine).

Update: if I change the clock() calls to the required jumble of std::chrono incantations I get:

Total encoding time: 0.400000 secs
Total processing time: 0.417000 secs

This was as millis so on a many core or fast machine misses the nuances. I could do a PR for this and switch to micros if this is of interest? Something like this:

https://github.com/richgel999/bc7enc_rdo/compare/master...cwoffenden:bc7enc_rdo:mt-timer?expand=1

(It's what I'm using to time the BC4/5 changes I made)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant