New submission from Stefan Behnel:

Fractions are great for all sorts of exact computations (including 
money/currency calculations), but are quite slow due to the need for 
normalisation at instantiation time.

I adapted the existing telco benchmark to use Fraction instead of Decimal to 
make this problem more visible. One change I made was to take the data reading 
out of the measured loop. I/O is not part of what the benchmark should measure.

Please consider adding it to the benchmark suite.

----------
components: Benchmarks
files: telco_fractions.py
messages: 227252
nosy: scoder
priority: normal
severity: normal
status: open
title: Add fractions benchmark
type: enhancement
Added file: http://bugs.python.org/file36684/telco_fractions.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22458>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to