wangtongada / gmpy

Automatically exported from code.google.com/p/gmpy
GNU Lesser General Public License v3.0
0 stars 0 forks source link

patch: faster SELF_NO_ARG #23

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
With the attached patch SELF_NO_ARG is faster
                        speedup with a = mpz(10)**16/3
sqrt function           11%
sqrt method             2%

is_square function      8%
is_square method        11%

binary function         12%
binary method           5%

Tests made on HP Pavilion Q8200 2.33GHz

Original issue reported on code.google.com by mario.pe...@gmail.com on 26 Jan 2009 at 11:17

Attachments:

GoogleCodeExporter commented 8 years ago
I committed the change to the error message for bit_length. Since SELF_NO_ARG 
is used
in many places and one of the error messages changes, I don't want to commit 
this to
1.04 without more thought.

Case

Original comment by casevh on 28 Jan 2009 at 6:58

GoogleCodeExporter commented 8 years ago
Sorry this has taken so long but I've implemented these, and many more, 
improvements
in gmpy 1.11. Compared to gmpy 1.04, the test suite runs 9% faster.

Original comment by casevh on 3 Dec 2009 at 5:21