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

Performance? #26

Open
michalrus opened this issue Jun 8, 2018 · 4 comments
Open

Performance? #26

michalrus opened this issue Jun 8, 2018 · 4 comments

Comments

@michalrus
Copy link

Hello!

Thank you for this wonderful piece of code. =)

Have you tried tuning the performance?

E.g. for 10,000 random matches (each of max. 5 teams of max. 10 members each) it consistently takes:

  • 79.41 s to calculate new ratings (so ~8 ms per parallelized/amortized rate()),
  • 16.52 s to calculate match qualities (~2 ms per parallel quality())

… on 4 cores (and 4 parallel python3 processes).

@michalrus
Copy link
Author

There’s also some C++ version that doesn’t do teams but is ~200× faster → https://github.com/JesseBuesking/trueskill#benchmark .

@bernd-wechner
Copy link
Contributor

At a random guess I'd say you're just looking at the difference between Python and C++ in terms of performance. But I'm guessing if you were keen you could profile both of them and look for the bottlenecks, try doing a flame graph, very informative:

http://www.brendangregg.com/flamegraphs.html

@michalrus
Copy link
Author

Very cool, I’ll try that! Thanks. =)

@sublee
Copy link
Owner

sublee commented Jun 11, 2018

When I implemented it, performance was not one of the goals. The goal is to implement the TrueSkill algorithm with clean code for ease of understanding.

If you need better performance, another implementation (perhaps, with another language) will be helpful rather than this project.

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

3 participants