7 ms·
Looking techempower's benchmark code, specifically the "dbs" and "update" functions (which are weighted highly), I think there's some optimization that could be
by collinmanderson 6y ago
Looking techempower's benchmark code, specifically the "dbs" and "update" functions (which are weighted highly), I think there's some optimization that could be done, like using .values() and .update() in more places.
https://github.com/TechEmpower/FrameworkBenchmarks/blob/master/frameworks/Python/django/hello/world/views.py https://github.com/TechEmpower/FrameworkBenchmarks/blob/mast...
Django ends up getting benchmarked against "uvicorn" which just uses raw sql, so yeah, of course raw sql is faster. Django has a raw sql option too, but they're not using it for the benchmark.
https://github.com/TechEmpower/FrameworkBenchmarks/blob/master/frameworks/Python/uvicorn/app.py https://github.com/TechEmpower/FrameworkBenchmarks/blob/mast...
- throwaway189262 6y agoIn Java at least, the massive Hibernate ORM is only about twice as slow as raw SQL. Which is still orders of magnitude faster than Django. The lack of performance is far deeper than ORM usage.