Notice: While JavaScript is not essential for this website, your interaction with the content will be limited. Please turn JavaScript on for the full experience.
...128-bit output with a 128-bit seed as well as 32-bit output without seed. The relevant function prototype for 64-bit CityHash with 128-bit seed is: uint64 CityHash64WithSeeds(const char *buf, size_t len, uint64 seed0, uint64 seed1) CityHash also offers SSE 4.2 optimizations with CRC32 intrinsic for long inputs. All variants except CityHash32 require 64-bit data types. CityHash32 uses only 32-bit data types but it doesn't support seeding. Like MurmurHash Aumasson, Ber...
...128-bits float Add a new IEEE 754-2008 quad-precision binary float type. The IEEE 754-2008 quad precision float has 1 sign bit, 15 bits of exponent and 112 bits of mantissa. 128-bits float is supported by GCC (4.3), Clang and ICC compilers. Python must be portable and so cannot rely on a type only available on some platforms. For example, Visual C++ 2008 doesn't support 128-bits float, whereas it is used to build the official Windows executables. Another example: GCC 4.3 does not support __floa...
...128-bit algorithm and not a 16-byte one, for example. This is because, in the sample code I looked at, the length in bytes is often needed (to seek ahead or behind in a file; to compute the length of an output string) while the length in bits is rarely used. Therefore, the burden will fall on the few people actually needing the size in bits, who will have to multiply digest_size by 8. It's been suggested that the update() method would be better named append(). However, that method is really ca...
Python Patterns - An Optimization Anecdote Warning This page stays here for historical reasons and it may contain outdated or incorrect information. The other day, a friend asked me a seemingly simple question: what's the best way to convert a list of integers into a string, presuming that the integers are ASCII values. For instance, the list [97, 98, 99] should be converted to the string 'abc'. Let's assume we want to write a function to do this. The first version I came ...
PEP 3128 -- BList: A Faster List-like Type PEP:3128 Title:BList: A Faster List-like Type Author:Daniel Stutzbach <daniel at stutzbachenterprises.com> Discussions-To:python-3000 at python.org Status:Rejected Type:Standards Track Created:30-Apr-2007 Python-Version:2.6, 3.0 Post-History:30-Apr-2007 Contents Rejection Notice Abstract Motivation Use Case Trade-offs Implementation Memory Usage Backwards Compatibility Reference Implementation Porting to Other Python Variants ...
PEP 393 -- Flexible String Representation PEP:393 Title:Flexible String Representation Author:Martin v. Löwis <martin at v.loewis.de> Status:Final Type:Standards Track Created:24-Jan-2010 Python-Version:3.3 Post-History: Contents Abstract Rationale Specification String Creation String Access New API Stable ABI GDB Debugging Hooks Deprecations, Removals, and Incompatibilities Discussion Performance Porting Guidelines References Copyright Abstract The Unicode string...
PEP 524 -- Make os.urandom() blocking on Linux PEP:524 Title:Make os.urandom() blocking on Linux Author:Victor Stinner <vstinner at python.org> Status:Final Type:Standards Track Created:20-Jun-2016 Python-Version:3.6 Contents Abstract The bug Original bug Status in Python 3.5.2 Use Cases Use Case 1: init script Use case 1.1: No secret needed Use case 1.2: Secure secret required Use Case 2: Web server Fix system urandom Load entropy from disk at boot Virtual machines...
Notes (editors: check NEWS.help for information about editing NEWS using ReST.) What's New in Python 2.4 final? Release date: 30-NOV-2004 Core and builtins Bug 875692: Improve signal handling, especially when using threads, by forcing an early re-execution of PyEval_EvalFrame() "periodic" code when things_to_do is not cleared by Py_MakePendingCalls(). What's New in Python 2.4 (release candidate 1) Release date: 18-NOV-2004 Core and builtins Bug 1061968: Fixes in 2.4a3 to ad...
PEP 418 -- Add monotonic time, performance counter, and process time functions PEP:418 Title:Add monotonic time, performance counter, and process time functions Author:Cameron Simpson <cs at cskk.id.au>, Jim Jewett <jimjjewett at gmail.com>, Stephen J. Turnbull <stephen at xemacs.org>, Victor Stinner <vstinner at python.org> Status:Final Type:Standards Track Created:26-Mar-2012 Python-Version:3.3 Contents Abstract Rationale Python functions New Functions...
Python 2.4.1 - Release Notes (editors: check NEWS.help for information about editing NEWS using ReST.) What's New in Python 2.4.1 final? Release date: 30-MAR-2005 Core and builtins Move exception finalisation later in the shutdown process - this fixes the crash seen in bug #1165761 Tests SF patch 1167316: doctest.py fails self-test if run directly. Build SF patch 1171767: Darwin 8's headers are anal about POSIX compliance, and linking has changed (prebinding is now deprecated, and l...