3 ms·
Ok, but why did my app get 10 times faster? Why do so many other people report similar results? Perhaps factorial benchmarks don't translate well to the compa
by udfalkso 7y ago
Ok, but why did my app get 10 times faster? Why do so many other people report similar results? Perhaps factorial benchmarks don't translate well to the comparison of complex real world systems.
I think, when it comes to web apps specifically, there are a few advantages that make a practical difference. These seem to be the major ones:
- Compiled templates and more efficient string interpolation
- Improved parallelism and lighter weight processes. This leads to better handling of many requests in parallel (esp. while most are just waiting on IO), better db connection pooling, less blocking, etc.
A few other ideas are mentioned here by someone who seems to know more about this than I do: https://news.ycombinator.com/item?id=12014243 https://news.ycombinator.com/item?id=12014243
- zbentley 7y ago> Ok, but why did my app get 10 times faster? You rewrote it. The language you rewrote it in probably has less to do with it than rebuilding all at once what initially was built over time/organically.
- udfalkso 7y agoYeah that’s probably the case for most rewrites. But in this case the django app was a full rewrite of a php app. It’s quite similar to the eventual elixir app. I feel it’s pretty much a fair fight, but you’ll have to take my word for it.
- pdimitar 7y ago> You rewrote it. The language you rewrote it in probably has less to do with it than rebuilding all at once what initially was built over time/organically. That's a very unfair blanket statement. There are no ways to reduce the inherent flaws of mutable imperative languages no matter how much times you might rewrite the apps in the same language. You definitely can reduce bug surface but not by much; shared data is much more prone to bugs and human mistakes than a system with a runtime that puts immutable data and message-passing front and center. I'll give you that rewrites do improve state of any random app. But I think you are overestimating this factor with your pretty broad and somewhat dismissive statement.