cURL / Mailing Lists / curl-library / Single Mail


Re: Speed comparison wget vs. curl (HTTPS/HTTP1/GnuTLS)

From: Daniel Stenberg <>
Date: Wed, 29 Jun 2016 22:51:22 +0200 (CEST)

On Wed, 29 Jun 2016, Tim Rühsen wrote:

> I recently made a few comparisons between curl 7.50.0-DEV and wget 1.18 and
> was astonished about wget outperforming curl by some fair amount on single
> HTTPS request/response cycles.

They really *should* perform very similarly.

> So my question goes... what is 'wrong' with that version of curl. Or what
> did I oversee - maybe some special options ?

No special option should be necessary. Other than of course protocol version
differences and cipher selections etc.

> Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz
> 2MBit/s DSL, ping to is ~106ms
> Downloading a non-existent page at (a.html) via HTTPS/HTTP1.1.
> The figures from 'time' are the fastest I got in 10 tries.
> $ time curl -s -o/dev/null
> $ time wget -q -o/dev/null --no-alpn

I assume you meant --no-alpn on the curl command line?

I have 100mbit and 2.5ms ping time to I doubt it matters much
but my CPU is a Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz

My local tests on your command lines:

[current git master using OpenSSL/1.1.0]
$ time ./src/curl -s -o/dev/null --no-alpn
real 0m0.041s
user 0m0.020s
sys 0m0.004s

[1.18 from Debian, using GnuTLS)
$ time wget -q -o/dev/null
real 0m0.044s
user 0m0.024s
sys 0m0.000s

[my Debian curl 7.47.0 using GnuTLS/3.4.13 I get much worse results]
$ time curl -s -o/dev/null --no-alpn
real 0m0.159s
user 0m0.084s
sys 0m0.012s

I didn't check the TLS negotiated TLS ciphers.

> Looks like there is some (pretty huge ~ 240ms) startup penalty hidden
> somewhere. Building with OpenSSL makes not much difference.

Interesting find. Thanks for pointing this out. Clearly there are reasons to
take a deeper look into this.


List admin:
Received on 2016-06-29