Re: Startup performance on OS X

2016-10-03 Thread Trey Harris
That is really lovely. I don’t know what criteria are used for Rosetta
Code, but the article’s implementation is the clearest “program as concrete
explication of algorithm” I’ve ever seen. It took me *years* to understand
RSA’s internals to the point that I could explain it if asked to in an
interview, but I suspect if I’d had that code as my example I’d have just
gotten it.

It’s hard for me to be certain because I *do* know the algorithm now, of
course. But from Damian’s YAPC keynote and looking at the primality tests
and whatnot, I suspect my intuition is right—but for the hyperoperators,
which are certainly a bit difficult for folks who haven’t done much
functional programming or MapReduce-type programming, Perl 6 is some of the
niftiest pseudocode I’ve ever seen. That it *runs* is just gravy. :-)

On Mon, Oct 3, 2016 at 11:03 AM Patrick R. Michaud pmich...@pobox.com
 wrote:

On Mon, Oct 03, 2016 at 04:26:10PM +0200, Elizabeth Mattijsen wrote:
> > > On 02 Oct 2016, at 11:00, Thor Michael Støre 
> wrote:
> > > Is this normal startup performance?
> >
> > https://www.promptworks.com/blog/public-keys-in-perl-6
> >
> > I wonder what would be needed to run this in Perl 5, module wise, and
> CPU wise.
>
> This also seems like an interesting task for Rosetta Code (the RSA key
> generation part).
>
> Rosetta Code already has an entry for RSA encryption/decryption in Perl 6
> (but not Perl), but I'm wondering if the article's version is better than
> Rosetta Code's existing Perl 6 entry.
>
>http://rosettacode.org/wiki/RSA_code#Perl_6
>
> Pm
>
​


Re: Startup performance on OS X

2016-10-03 Thread Thor Michael Støre
Yeah, it just got really noticeable when I had to run a relatively short script 
over and over again, one that would have appeared to finish instantly on Perl 
5. Startup time just stood out first since that’s about fifteen times higher on 
6 vs stock 5. But I also see now that my full script has other performance 
issues, that I have to dig elsewhere to sort out.

Thanks,
Thor Michael

> On 3. okt. 2016, at 00.35, Patrick R. Michaud  wrote:
> 
> On Sun, Oct 02, 2016 at 11:00:38AM +0200, Thor Michael Støre wrote:
>> Thormicks-MacBook-Pro-3:~ thormick$ time perl6 -e "say 'foo'"
>> foo
>> 
>> real 0m0.205s
>> user 0m0.150s
>> sys  0m0.045s
>> 
>> [...]
>> 
>> Foo indeed! ~200ms for this seems awfully slow to me.
> 
> On another hand, my machine shows:
> 
> $ time perl -MMoose -E "say 'foo'"
> foo
> 
> real  0m0.190s
> user  0m0.172s
> sys   0m0.012s
> 
> It feels like Perl 6 might at least be in the same ballpark as Perl 5 for 
> similar capabilities.
> 
> Startup time is definitely something to be aware of, but most people have 
> needs beyond outputting a line of text to STDOUT.
> 
> Pm

---
Thor Michael Støre
thormich...@gmail.com
Database guy in Kongsberg, Norway
Mobile: +47 97 15 14 09



Re: Startup performance on OS X

2016-10-03 Thread Patrick R. Michaud
On Mon, Oct 03, 2016 at 04:26:10PM +0200, Elizabeth Mattijsen wrote:
> > On 02 Oct 2016, at 11:00, Thor Michael Støre  wrote:
> > Is this normal startup performance?
> 
> https://www.promptworks.com/blog/public-keys-in-perl-6
> 
> I wonder what would be needed to run this in Perl 5, module wise, and CPU 
> wise.

This also seems like an interesting task for Rosetta Code (the RSA key 
generation part).  

Rosetta Code already has an entry for RSA encryption/decryption in Perl 6 (but 
not Perl), but I'm wondering if the article's version is better than Rosetta 
Code's existing Perl 6 entry.

   http://rosettacode.org/wiki/RSA_code#Perl_6

Pm


Re: Startup performance on OS X

2016-10-03 Thread Elizabeth Mattijsen
> On 02 Oct 2016, at 11:00, Thor Michael Støre  wrote:
> Is this normal startup performance?

https://www.promptworks.com/blog/public-keys-in-perl-6

I wonder what would be needed to run this in Perl 5, module wise, and CPU wise.



Liz

Re: Startup performance on OS X

2016-10-03 Thread Kaare Rasmussen

On 2016-10-03 12:14, Elizabeth Mattijsen wrote:
Wrt to Pm’s timing of perl 5 with Moose: if you actually want to have 
most of Perl 6’s capabilities in Perl 5 with Moose, you will need to 
load quite a few MooseX:: classes as well. Which cannot have a 
positive effect on load time. 



Right. But that's not too impressive, as one of the major criticisms of 
Moose is exactly the startup overhead it introduces. Mainly explained 
with the compile time of large modules. With Perl 6's compile 
development, I hope we'll end up in a completely other ballpark, eventually.


/kaare



Re: Startup performance on OS X

2016-10-03 Thread Elizabeth Mattijsen
$ time install/bin/nqp -e ''

real0m0.025s
user0m0.017s
sys 0m0.006s

Liz

> On 03 Oct 2016, at 12:45, Brock Wilcox  wrote:
> 
> It seems like Moose vs built-in-oop/mop is a very indirect comparison. Now 
> I'm wondering what nqp or moarvm startups are like.
> 
> 
> On Oct 3, 2016 06:14, "Elizabeth Mattijsen"  wrote:
> > On 02 Oct 2016, at 11:00, Thor Michael Støre  wrote:
> >
> > Hey everyone!
> >
> > Is this normal startup performance?
> >
> >
> > Thormicks-MacBook-Pro-3:~ thormick$ time perl6 -e "say 'foo'"
> > foo
> >
> > real  0m0.444s
> > user  0m0.166s
> > sys   0m0.067s
> > Thormicks-MacBook-Pro-3:~ thormick$ time perl6 -e "say 'foo'"
> > foo
> >
> > real  0m0.202s
> > user  0m0.148s
> > sys   0m0.044s
> > Thormicks-MacBook-Pro-3:~ thormick$ time perl6 -e "say 'foo'"
> > foo
> >
> > real  0m0.205s
> > user  0m0.150s
> > sys   0m0.045s
> > Thormicks-MacBook-Pro-3:~ thormick$ perl6 -version
> > This is Rakudo version 2016.07.1 built on MoarVM version 2016.07
> > implementing Perl 6.c.
> >
> >
> > Foo indeed! ~200ms for this seems awfully slow to me.
> 
> FWIW, this is what I have on my MBP (2.8Ghz i7 Early 2013, SSD):
> 
> $ time perl6 -e "say 'foo'"
> foo
> 
> real0m0.122s
> user0m0.098s
> sys 0m0.023s
> 
> $ perl6 -version
> This is Rakudo version 2016.09-104-gc4c0718 built on MoarVM version 
> 2016.09-13-g34c375a
> implementing Perl 6.c.
> 
> 
> Wrt to Pm’s timing of perl 5 with Moose: if you actually want to have most of 
> Perl 6’s capabilities in Perl 5 with Moose, you will need to load quite a few 
> MooseX:: classes as well.  Which cannot have a positive effect on load time.
> 
> 
> 
> Liz



Re: Startup performance on OS X

2016-10-03 Thread Brock Wilcox
It seems like Moose vs built-in-oop/mop is a very indirect comparison. Now
I'm wondering what nqp or moarvm startups are like.

On Oct 3, 2016 06:14, "Elizabeth Mattijsen"  wrote:

> > On 02 Oct 2016, at 11:00, Thor Michael Støre 
> wrote:
> >
> > Hey everyone!
> >
> > Is this normal startup performance?
> >
> >
> > Thormicks-MacBook-Pro-3:~ thormick$ time perl6 -e "say 'foo'"
> > foo
> >
> > real  0m0.444s
> > user  0m0.166s
> > sys   0m0.067s
> > Thormicks-MacBook-Pro-3:~ thormick$ time perl6 -e "say 'foo'"
> > foo
> >
> > real  0m0.202s
> > user  0m0.148s
> > sys   0m0.044s
> > Thormicks-MacBook-Pro-3:~ thormick$ time perl6 -e "say 'foo'"
> > foo
> >
> > real  0m0.205s
> > user  0m0.150s
> > sys   0m0.045s
> > Thormicks-MacBook-Pro-3:~ thormick$ perl6 -version
> > This is Rakudo version 2016.07.1 built on MoarVM version 2016.07
> > implementing Perl 6.c.
> >
> >
> > Foo indeed! ~200ms for this seems awfully slow to me.
>
> FWIW, this is what I have on my MBP (2.8Ghz i7 Early 2013, SSD):
>
> $ time perl6 -e "say 'foo'"
> foo
>
> real0m0.122s
> user0m0.098s
> sys 0m0.023s
>
> $ perl6 -version
> This is Rakudo version 2016.09-104-gc4c0718 built on MoarVM version
> 2016.09-13-g34c375a
> implementing Perl 6.c.
>
>
> Wrt to Pm’s timing of perl 5 with Moose: if you actually want to have most
> of Perl 6’s capabilities in Perl 5 with Moose, you will need to load quite
> a few MooseX:: classes as well.  Which cannot have a positive effect on
> load time.
>
>
>
> Liz


Re: Startup performance on OS X

2016-10-03 Thread Elizabeth Mattijsen
> On 02 Oct 2016, at 11:00, Thor Michael Støre  wrote:
> 
> Hey everyone!
> 
> Is this normal startup performance?
> 
> 
> Thormicks-MacBook-Pro-3:~ thormick$ time perl6 -e "say 'foo'"
> foo
> 
> real  0m0.444s
> user  0m0.166s
> sys   0m0.067s
> Thormicks-MacBook-Pro-3:~ thormick$ time perl6 -e "say 'foo'"
> foo
> 
> real  0m0.202s
> user  0m0.148s
> sys   0m0.044s
> Thormicks-MacBook-Pro-3:~ thormick$ time perl6 -e "say 'foo'"
> foo
> 
> real  0m0.205s
> user  0m0.150s
> sys   0m0.045s
> Thormicks-MacBook-Pro-3:~ thormick$ perl6 -version
> This is Rakudo version 2016.07.1 built on MoarVM version 2016.07
> implementing Perl 6.c.
> 
> 
> Foo indeed! ~200ms for this seems awfully slow to me.

FWIW, this is what I have on my MBP (2.8Ghz i7 Early 2013, SSD):

$ time perl6 -e "say 'foo'"
foo

real0m0.122s
user0m0.098s
sys 0m0.023s

$ perl6 -version
This is Rakudo version 2016.09-104-gc4c0718 built on MoarVM version 
2016.09-13-g34c375a
implementing Perl 6.c.


Wrt to Pm’s timing of perl 5 with Moose: if you actually want to have most of 
Perl 6’s capabilities in Perl 5 with Moose, you will need to load quite a few 
MooseX:: classes as well.  Which cannot have a positive effect on load time.



Liz

Re: Startup performance on OS X

2016-10-02 Thread Timo Paulssen
On my machine it's about 0.1 seconds.

The machine i'm using has this CPU in it:

  Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz

And it runs off an SSD.
  - Timo


Re: Startup performance on OS X

2016-10-02 Thread Patrick R. Michaud
On Sun, Oct 02, 2016 at 11:00:38AM +0200, Thor Michael Støre wrote:
> Thormicks-MacBook-Pro-3:~ thormick$ time perl6 -e "say 'foo'"
> foo
> 
> real  0m0.205s
> user  0m0.150s
> sys   0m0.045s
>
> [...]
> 
> Foo indeed! ~200ms for this seems awfully slow to me.

On another hand, my machine shows:

$ time perl -MMoose -E "say 'foo'"
foo

real0m0.190s
user0m0.172s
sys 0m0.012s

It feels like Perl 6 might at least be in the same ballpark as Perl 5 for 
similar capabilities.

Startup time is definitely something to be aware of, but most people have needs 
beyond outputting a line of text to STDOUT.

Pm