Staging
v0.8.1
https://github.com/python/cpython
Revision 7c2a85b2d44851c2442ade579b760f86447bf848 authored by Tim Peters on 31 August 2004, 02:19:55 UTC, committed by Tim Peters on 31 August 2004, 02:19:55 UTC
ldexp.  Both methods are exact, and return the same results.  Turns out
multiplication is a few (but just a few) percent faster on my box.
They're both significantly faster than using struct with a Q format
to convert bytes to a 64-bit long (struct.unpack() appears to lose due
to the tuple creation/teardown overhead), and calling _hexlify is
significantly faster than doing bytes.encode('hex').  So we appear to
have hit a local minimum (wrt speed) here.
1 parent 3fa19d7
History
Tip revision: 7c2a85b2d44851c2442ade579b760f86447bf848 authored by Tim Peters on 31 August 2004, 02:19:55 UTC
HardwareRandom: Go back to multiplying by 2**-BPF instead of using
Tip revision: 7c2a85b
File Mode Size
VC6
bdist_wininst
example_nt
os2emx
os2vacpp
.cvsignore -rw-r--r-- 30 bytes
WinMain.c -rw-r--r-- 447 bytes
_winreg.c -rw-r--r-- 42.7 KB
config.c -rw-r--r-- 4.1 KB
dl_nt.c -rw-r--r-- 908 bytes
dllbase_nt.txt -rw-r--r-- 3.5 KB
frozen_dllmain.c -rw-r--r-- 3.6 KB
getpathp.c -rw-r--r-- 18.0 KB
icons.mak -rw-r--r-- 213 bytes
icons.rc -rw-r--r-- 59 bytes
import_nt.c -rw-r--r-- 2.4 KB
make_versioninfo.c -rw-r--r-- 1.0 KB
msvcrtmodule.c -rwxr-xr-x 4.9 KB
py.ico -rw-r--r-- 766 bytes
pyc.ico -rw-r--r-- 766 bytes
pycon.ico -rw-r--r-- 766 bytes
pyconfig.h -rw-r--r-- 15.5 KB
python.mk -rw-r--r-- 234 bytes
python_exe.rc -rw-r--r-- 49 bytes
python_nt.rc -rw-r--r-- 1.8 KB
readme.txt -rw-r--r-- 4.2 KB
testpy.py -rw-r--r-- 890 bytes
w9xpopen.c -rw-r--r-- 3.6 KB
winsound.c -rw-r--r-- 7.1 KB

readme.txt

back to top