J
Juan Alvarez
I ran this simple benchmark:
Benchmark.bm do |x|
x.report('Curl::Easy.http_get') do
Curl::Easy.http_get(text)
end
x.report('RestClient.get') do
RestClient.get(text)
end
end
RestClient uses the standard Net:HTTP library so the benchmark is really
trying to compare Net::HTTP vs curb (libcurl bindings).
These are the results I get:
user system total real
Curl::Easy.http_get 0.070000 0.130000 0.200000 ( 26.319104)
RestClient.get 0.970000 0.580000 1.550000 ( 23.557923)
I get these results consistently where curb's user, system and total
times are dramatically lower than Net::HTTP's. However, Net:HTTP is
reported to run faster by the real column. Shouldn't the reported real
time be consistent with the other columns?
I'm running this benchmark on a 2.4Ghz Core 2 Duo with 2GB RAM MacBook
Pro, if that helps.
Thanks,
Juan
Benchmark.bm do |x|
x.report('Curl::Easy.http_get') do
Curl::Easy.http_get(text)
end
x.report('RestClient.get') do
RestClient.get(text)
end
end
RestClient uses the standard Net:HTTP library so the benchmark is really
trying to compare Net::HTTP vs curb (libcurl bindings).
These are the results I get:
user system total real
Curl::Easy.http_get 0.070000 0.130000 0.200000 ( 26.319104)
RestClient.get 0.970000 0.580000 1.550000 ( 23.557923)
I get these results consistently where curb's user, system and total
times are dramatically lower than Net::HTTP's. However, Net:HTTP is
reported to run faster by the real column. Shouldn't the reported real
time be consistent with the other columns?
I'm running this benchmark on a 2.4Ghz Core 2 Duo with 2GB RAM MacBook
Pro, if that helps.
Thanks,
Juan