354 karma · joined March 4, 2012
- https://rhardih.io
- https://github.com/rhardih
- https://twitter.com/rhardihThe fastest time to sort an integer array is O(N)
It could be interpreted as generally applicable. The proposed method uses reverse-indexed flagging, an approach which isn't really feasible if element values are very large.
Generally, the lower bound for any comparison based sorting algorithm is Ω( n log( n )).
That is however, the same intended purpose as this tool.
So, there's no reason to use GZIP or HTTP2 with a SimpleHTTPServer replacement. If you need those features, it's because you're doing things _in production_
Call me old fashioned, but I find it useful to know what a request would look like served from a production setting, without actually having to get it from production.
If you're optimising for load times, the final size of a gzipped request matters greatly. It's nice to know if you're within the 14kb boundary before pushing out.
HTTP/2 is a completely different beast as well. Since this is mostly for working on static sites, odds are you might host on a CDN with static file caches. If you've optimised your site for HTTP/1.1, bundling, inlining etc., but the the edge of the CDN actually serves these files as HTTP/2, you're very likely to have worked against the performance improvements given to you by HTTP/2.
Joking aside, you are correct. Go shipping pre-installed is a yet to be seen nice-to-have on most systems.