19得票5回答
Python的Decimal是否有更快的替代品?

有人知道Python中更快的十进制实现吗?如下面的示例所示,标准库的decimal模块比float慢大约100倍。from timeit import Timer def run(val, the_class): test = the_class(1) for c in x...