3 ms·
Why is it way faster than Flask? Are there any changes that can be made to Flask to improve the speed? Would it be silly to use both Flask and Hug?
by voltagex_ 11y ago
Why is it way faster than Flask? Are there any changes that can be made to Flask to improve the speed?
Would it be silly to use both Flask and Hug?
- timothycrosley 11y agoThere's a bunch of reasons, but they really come down to a focus on memory efficiency and knowledge of how certain things perform on Python (using hasattr instead of isinstance where applicable, using __slots__, only processing things when it's clear they need to be processed). And then for extra measure: Cython compilation. You can see a competing frameworks benchmarks showing the result of all this work here: http://pycnic.nullism.com/ http://pycnic.nullism.com/
- voltagex_ 11y agoThat's really cool, thanks.