Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

require ::($foo) slowdown for installed modules #5231

Closed
p6rt opened this issue Apr 11, 2016 · 4 comments
Closed

require ::($foo) slowdown for installed modules #5231

p6rt opened this issue Apr 11, 2016 · 4 comments

Comments

@p6rt
Copy link

p6rt commented Apr 11, 2016

Migrated from rt.perl.org#127873 (status was 'resolved')

Searchable as RT127873$

@p6rt
Copy link
Author

p6rt commented Apr 11, 2016

From @dwarring

:

% git checkout https://github.com/cosimo/perl6-digest-md5.git
% cd https://github.com/cosimo/perl6-digest-md5.git
% perl6 -v
This is Rakudo version 2016.03-105-ga3b8fef built on MoarVM version 2016.03-84-g4afd7b6
implementing Perl 6.c.
% # benchmark -I lib
% perl6 -I lib -e'use Bench; require :​:("Digest​::MD5"); Bench.new.timethese(100, {'require-1' => sub { require :​:("Digest​::MD5")}})';
enchmark​:
Timing 100 iterations of require...
  require​: 0.3260 wallclock secs @​ 306.7511/s (n=100)
  (warning​: too few iterations for a reliable count)

But if I install the module, and require that​:

% panda install .
% perl6 -e'use Bench; require :​:("Digest​::MD5"); Bench.new.timethese(100, {require => sub { require :​:("Digest​::MD5")}})';
Benchmark​:
Timing 100 iterations of require...
  require​: 6.9965 wallclock secs @​ 14.2928/s (n=100)

That's vastly slower. I'm seeing similar results for other modules.

Note​: zef installation gives similar results.

@p6rt
Copy link
Author

p6rt commented Jul 10, 2016

From @zoffixznet

Still present in Rakudo version 2016.06-154-g55c359e built on MoarVM version 2016.06-9-g8fc21d5

zoffix@​VirtualBox​:/tmp/tmp.khD0mHbPlB$ perl6 -Ilib -e 'use Bench; require :​:("Digest​::MD5"); Bench.new.timethese(200, {"require-1" => sub { require :​:("Digest​::MD5")}})'
Benchmark​:
Timing 200 iterations of require-1...
require-1​: 1.5050 wallclock secs @​ 132.8885/s (n=200)

zoffix@​VirtualBox​:/tmp/tmp.khD0mHbPlB$ zef install .
...

zoffix@​VirtualBox​:/tmp/tmp.NwXDcnl6v4$ perl6 -Ilib -e 'use Bench; require :​:("Digest​::MD5"); Bench.new.timethese(200, {"require-1" => sub { require :​:("Digest​::MD5")}})'
Benchmark​:
Timing 200 iterations of require-1...
require-1​: 5.1958 wallclock secs @​ 38.4927/s (n=200)

@p6rt
Copy link
Author

p6rt commented Mar 11, 2017

From @dwarring

A rerun of the benchmarks on the same old x346 server​:

david@​X346​:~/git/perl6-PDF$ perl6 -v
This is Rakudo version 2017.02-233-g28a48ea built on MoarVM version 2017.02-38-g5845784
implementing Perl 6.c.
david@​X346​:~/git/perl6-PDF$ perl6 -I lib -e'use Bench; require :​:("Digest​::MD5"); Bench.new.timethese(100, {require => sub { require :​:("Digest​::MD5")}})';
Benchmark​:
Timing 100 iterations of require...
  require​: 1.3561 wallclock secs @​ 73.7388/s (n=100)
david@​X346​:~/git/perl6-PDF$ perl6 -e'use Bench; require :​:("Digest​::MD5"); Bench.new.timethese(100, {require => sub { require :​:("Digest​::MD5")}})';
Benchmark​:
Timing 100 iterations of require...
  require​: 1.0952 wallclock secs @​ 91.3046/s (n=100)

Slowdown from require of installed module has gone.

Now faster that uninstalled, partly because of a modest performance regression. But no major performance anomaly anymore. Closing this ticket.

On Sat, 09 Jul 2016 19​:45​:04 -0700, cpan@​zoffix.com wrote​:

Still present in Rakudo version 2016.06-154-g55c359e built on MoarVM
version 2016.06-9-g8fc21d5

zoffix@​VirtualBox​:/tmp/tmp.khD0mHbPlB$ perl6 -Ilib -e 'use Bench;
require :​:("Digest​::MD5"); Bench.new.timethese(200, {"require-1" =>
sub { require :​:("Digest​::MD5")}})'
Benchmark​:
Timing 200 iterations of require-1...
require-1​: 1.5050 wallclock secs @​ 132.8885/s (n=200)

zoffix@​VirtualBox​:/tmp/tmp.khD0mHbPlB$ zef install .
...

zoffix@​VirtualBox​:/tmp/tmp.NwXDcnl6v4$ perl6 -Ilib -e 'use Bench;
require :​:("Digest​::MD5"); Bench.new.timethese(200, {"require-1" =>
sub { require :​:("Digest​::MD5")}})'
Benchmark​:
Timing 200 iterations of require-1...
require-1​: 5.1958 wallclock secs @​ 38.4927/s (n=200)

@p6rt p6rt closed this as completed Mar 11, 2017
@p6rt
Copy link
Author

p6rt commented Mar 11, 2017

@dwarring - Status changed from 'new' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant