Bitshifts and "And" vs Floor-division and Modular
Mark Lawrence
breamoreboy at yahoo.co.uk
Thu Sep 6 20:30:41 EDT 2012
More information about the Python-list mailing list
Thu Sep 6 20:30:41 EDT 2012
- Previous message (by thread): Bitshifts and "And" vs Floor-division and Modular
- Next message (by thread): Bitshifts and "And" vs Floor-division and Modular
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 07/09/2012 01:01, jimbo1qaz wrote: > Is it faster to use bitshifts or floor division? And which is better, & or %? > All divisors and mods are power of 2, so are binary operations faster? And are they considered bad style? > Why don't you use the timeit module and find out for yourself? -- Cheers. Mark Lawrence.
- Previous message (by thread): Bitshifts and "And" vs Floor-division and Modular
- Next message (by thread): Bitshifts and "And" vs Floor-division and Modular
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list