A FogBugz case was edited by Nicolas Cellier.
Case ID: 10436
Title: Fast-up mixed Integer Fraction sum and difference
Status: Work Needed
Category: Bug
Project: Kernel
Area: Misc
Priority: 6 - Fix If Time
Milestone: Pharo3.0: 30/03/2014
Assigned To: Everyone
URL:
https://pharo.fogbugz.com/default.asp?10436Like in Squeak, when we add/subtract a fraction and an integer, there's no point in checking for simplification of numerator/denominator.
This small refactoring has interesting micro benchmarks:
Large operands:
f := Float pi asFraction.
i := SmallInteger maxVal squared.
{
[ i + f ] bench.
[ f + i ] bench.
}
BEFORE: #('90,400 per second.' '88,100 per second.')
AFTER: #('557,000 per second.' '596,000 per second.')
Small operands:
f := 3/7.
i := 5.
{
[ i + f ] bench.
[ f + i ] bench.
}
BEFORE: #('1,000,000 per second.' '3,600,000 per second.')
AFTER: #('6,030,000 per second.' '6,430,000 per second.')
Vous êtes abonné(e) à ce dossier. Si vous ne souhaitez plus recevoir de notifications automatiques à l'avenir, désabonnez-vous (
https://pharo.fogbugz.com/default.asp?pre=preUnsubscribe&pg=pgEditBug&command=view&ixBug=10436) de ce dossier.
_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker