>From what I can see GO is purely compiled down to object code and linked into 
>static binaries.  IMHO Perl, as an interpreted language, is doing *super* to 
>be *only* twice the runtime of Go!   Maybe others have a better handle on 
>this.  

On March 8, 2014 3:26:31 PM EST, Gyepi SAM <[email protected]> wrote:
>On Sat, Mar 08, 2014 at 02:12:50PM -0500, David Larochelle wrote:
>> On Sat, Mar 8, 2014 at 1:40 PM, Gyepi SAM <[email protected]>
>wrote:
>> 
>> > For fun, I wrote a version in Go and it's twice as fast as the perl
>> > version. I imagine a C version would be faster yet, but I get paid
>for that
>> > kind of fun. I'd be happy to send you the Go version if you're
>interested.
>> 
>> 
>> 
>> I'm curious how you account for disk caches when your bench marking.
>I
>> fully expect that the CPU version of the code will be faster in GO
>than
>> Perl. But I wonder how much this matters if the file isn't already in
>the
>> disk cache.
>> 
>> An interesting test would be to run the GO version first on a file
>that's
>> you can be sure is not in the disk cache, then to run the Perl
>version on
>> that file. I.e. let Perl benefit from the disk cache and see if GO is
>still
>> faster.
>
>I have an SSD drive on my linux laptop so disk caching plays less of a
>role in
>my tests. I clear the cache with:
>
>    echo 3 | sudo tee /proc/sys/vm/drop_caches
>
>I repeated the tests after clearing the disk cache each time and also
>ran each
>test multiple times without clearing cache. The cached versions are a
>few
>seconds faster, but the overall results are the same; the Go version is
>about twice as fast.
>
>-Gyepi
>
>_______________________________________________
>Boston-pm mailing list
>[email protected]
>http://mail.pm.org/mailman/listinfo/boston-pm

_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to