3 ms·
Rationals are an interesting default choice, since they can have nasty performance corner-cases related to finding GCDs for large integers. For instance, note t
by al2o3cr 8y ago
Rationals are an interesting default choice, since they can have nasty performance corner-cases related to finding GCDs for large integers. For instance, note that the numerator & denominator of the rational results are both growing at (roughly) an order of magnitude per iteration.
- raiph 8y agoThe default rational type isn't unlimited precision. See my comment at https://www.reddit.com/r/perl/comments/93dabg/perl_6_small_stuff_4_why_perl_isnt_cobol_nor/e3e21s4 https://www.reddit.com/r/perl/comments/93dabg/perl_6_small_s... for an explanation and demonstration of P6's approach.