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

Bizarre speed results when .hyper are used #5085

Closed
p6rt opened this issue Jan 25, 2016 · 3 comments
Closed

Bizarre speed results when .hyper are used #5085

p6rt opened this issue Jan 25, 2016 · 3 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Jan 25, 2016

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

Searchable as RT127365$

@p6rt
Copy link
Author

p6rt commented Jan 25, 2016

From @zoffixznet

While playing around, I noticed the of .hyper produces very strange results. First, a control, without .hyper that consistently clocks in at around 2.3 seconds on my 2-core machine​:

$ perl6 -e '.base​: 16 for ^100000; say now - INIT now'
2.33417984

If we include the .hyper method, however, about 50% of the time, we get ridiculously faster results​: 58 times faster; or ridiculously slower results​: 19 times slower​:

$ perl6 -e '.base​: 16 for ^100000 .hyper; say now - INIT now'
0.0470114
$ perl6 -e '.base​: 16 for ^100000 .hyper; say now - INIT now'
34.64521881

My expected result is the use of .hyper would produce a marginal speed increase, utilizing my second core, and performing the computation between 0%–100% faster.

See also RT#​127364 for .race, which also produces results much slower than normal version, although I did not observe the inconsistency with speeds​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=127364

@p6rt
Copy link
Author

p6rt commented Jan 8, 2018

From @zoffixznet

On Mon, 25 Jan 2016 09​:11​:13 -0800, cpan@​zoffix.com wrote​:

While playing around, I noticed the of .hyper produces very strange
results. First, a control, without .hyper that consistently clocks in
at around 2.3 seconds on my 2-core machine​:

$ perl6 -e '.base​: 16 for ^100000; say now - INIT now'
2.33417984

If we include the .hyper method, however, about 50% of the time, we
get ridiculously faster results​: 58 times faster; or ridiculously
slower results​: 19 times slower​:

$ perl6 -e '.base​: 16 for ^100000 .hyper; say now - INIT now'
0.0470114
$ perl6 -e '.base​: 16 for ^100000 .hyper; say now - INIT now'
34.64521881

My expected result is the use of .hyper would produce a marginal speed
increase, utilizing my second core, and performing the computation
between 0%–100% faster.

See also RT#​127364 for .race, which also produces results much slower
than normal version, although I did not observe the inconsistency with
speeds​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=127364

This was filed before .hyper was properly made and I don't see any perf anomalies in current implementation.

@p6rt
Copy link
Author

p6rt commented Jan 8, 2018

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

@p6rt p6rt closed this as completed Jan 8, 2018
@p6rt p6rt added the perf label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant