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

Fibonacci Speed Test #3511

Closed
philiprbrenan opened this issue Jul 11, 2020 · 2 comments
Closed

Fibonacci Speed Test #3511

philiprbrenan opened this issue Jul 11, 2020 · 2 comments
Labels
meta RFCs, general discussion, writing style, repository organization, etc.

Comments

@philiprbrenan
Copy link

Hi Raku:

On page: https://docs.raku.org/language/faq#Is_Raku_fast_enough_for_me? the recommendation is to test with:

perl -Mbigint test.raku

which does indeed produce an excessive time, perhaps 20 time slower than Raku. However, if one uses Perl correctly:

time perl -M'bigint=only,Pari' test.raku >/dev/null

real    0m0.770s
user    0m0.762s
sys     0m0.008s

as compared to:

time raku test.raku >/dev/null

real    0m0.605s
user    0m0.649s
sys     0m0.020s

for the specified test program cat test.raku:

my ($prev, $current) = (1, 0);

for (0..100_000) {
    ($prev, $current) = ($current, $prev + $current);
}
print $current;

one obtains a more balanced result.

May I therefore entreat you to update your documentation to reflect these important results?

Thanks

@JJ
Copy link
Contributor

JJ commented Jul 11, 2020

Thanks a lot for your suggestion. As you see, however, the point of the page is to show the speed of Raku, not the speed of Perl. In the new comparison it's still faster, although just a bit. Achieving a "more balanced result" is not the objective; since this is not a competition between Perl and Raku; the point is proving that Raku can obtain competitive results in this particular arena. In that sense, we could think about many different speed comparisons with many other languages (as Jonathan Worthington has done in his talks), in some of which, of course, Raku will be slower.
In a sense, you are right drawing our attention to this question, which might have outlived its usefulness, since nowadays the speed of Raku has improved to the point of being competitive with many other languages.

@JJ JJ added the meta RFCs, general discussion, writing style, repository organization, etc. label Aug 16, 2020
@coke
Copy link
Collaborator

coke commented Mar 13, 2021

my 2¢ - we should do "fair" comparisons between the languages if we're trying to demonstrate speed.

However, given JJ's comment, rejecting this ticket.

@coke coke closed this as completed Mar 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta RFCs, general discussion, writing style, repository organization, etc.
Projects
None yet
Development

No branches or pull requests

3 participants