Re: A practical benchmark shows speed challenges for Perl 6

2016-03-29 Thread Timo Paulssen
On 03/29/2016 10:47 PM, Tom Browder wrote:
> On Wednesday, February 3, 2016, Tom Browder  > wrote:
>
> I use Perl for heavy duty text processing. A question on Perl Monks
> about Perl 5's handling of a large input file got me wondering how the
> two Perls compare at the moment.
>
>
> I see no significant improvement using my string and file read
> tests with the latest moarvm on my laptop (bummer). I'll give
> comparison stats a little later after I use my faster home server.
>
> Best regards,
>
> -Tom
>

Could you try using $filename.IO.slurp.lines instead of
$filename.IO.lines and see if that makes things any faster?
  - Timo


Re: A practical benchmark shows speed challenges for Perl 6

2016-03-29 Thread Timo Paulssen
On 02/03/2016 02:59 PM, Tom Browder wrote:
> I tried the suggestion from Bart Wiegmans to compile the program:
>
> $ perl6 --target=mbc --output=read-file-test.moarvm read-file-test.p6
> $ time perl6 read-file-test.moarvm large-1-gb-file.txt
> Error while reading from file: Malformed UTF-8
>
> So I guess precompilation is not yet ready for public testing.  That
> will be a nice feature, IMHO!
>
> Cheers!
>
> -Tom

Hey, the first time I read this, I didn't actually pay attention to
this. The reason you're getting that error is that you're not supposed
to invoke a .moarvm file with the perl6 command. Instead, you're
supposed to make your code into a module, put the generated .moarvm file
alongside it and then pull in that module with -M or "use" in your perl6
code.

You will probably need to pass a -I in order to make perl6 look for the
module in the right places.

By now, rakudo will automatically pre-compile anything you "use" or -M
(if that isn't prevented by "no precompilation" or things that aren't
supported), so that'll be easier.

Hope that helps!
  - Timo


Re: A practical benchmark shows speed challenges for Perl 6

2016-03-29 Thread Tom Browder
On Wednesday, February 3, 2016, Tom Browder  wrote:

> I use Perl for heavy duty text processing. A question on Perl Monks
> about Perl 5's handling of a large input file got me wondering how the
> two Perls compare at the moment.


I see no significant improvement using my string and file read tests with
the latest moarvm on my laptop (bummer). I'll give comparison stats a
little later after I use my faster home server.

Best regards,

-Tom