DEV Community

Discussion on: Simple web server implemented in Perl and Go

Collapse
 
wingman131 profile image
John Winger

I'm unclear how to interpret the results from ab. From the top chunk of the results (time taken for tests, requests per second, time per request, etc.), it would appear that Go is about 33% faster than Perl. But the bit at the bottom about "percentage of the requests served..." seems wildly incongruent and makes it look like Perl is orders of magnitude faster. It doesn't add up. It also doesn't logically add up for Perl to be faster than Go (which, I get, is your point). It makes me suspicious of ab's results.

Collapse
 
suntong profile image
suntong • Edited

Good point, looks to me things don't add up either. That's why I trust the measured & reported response time more than the statistical numbers. But as the other comment meant, I also agree this is an unfair comparison to Go...

Collapse
 
suntong profile image
suntong

I now know how to interpret those ab's results, after taking a peek at Go server's implementation -- the keyword is goroutine. I.e., Go server serviced ab's requests concurrently, thus finished faster than Perl overall. That why it appears that Go is a bit faster than Perl in statistics. However, when it comes to individual requests and response times, they suffered badly because of the massive concurrency. I.e., the measured & reported response time that I trusted previously are true.