Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Honest benchmarks.

"Select random number from MySQL"? I'd like to see the stochastic control for that one.



We have considered alternatives [1] but randomly selecting from 10,000 rows was selected because it's easy to implement in a threadsafe manner without introducing even more complicated requirements such as a concurrent queue or atomic counter.

Note that after the warm-up, MySQL is essentially guaranteed to have the entire table in its own cache, so the exercise is testing the ORM (if applicable), database connection pool, and the database driver.

Honestly, assuming none of the implementations are using an expensive random number generator (e.g., a random number generator intended for cryptographic use), I don't believe there would be different results if it were feasible to sequentially retrieve rows without the need to contend with concurrency.

[1] https://github.com/TechEmpower/FrameworkBenchmarks/issues/11...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: