Python Forum
The int that appears an odd number of times.
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
The int that appears an odd number of times.
#7
I think '&' operator will be faster
In [1]: %time 5 % 2 == 1
CPU times: user 0 ns, sys: 0 ns, total: 0 ns
Wall time: 4.05 µs
Out[1]: True

In [2]: %time 5 & 1 == 1
CPU times: user 0 ns, sys: 0 ns, total: 0 ns
Wall time: 3.1 µs
Out[2]: True
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply


Messages In This Thread
RE: The int that appears an odd number of times. - by wavic - Dec-30-2016, 09:54 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  times greater number than the previous rhai 4 4,548 Oct-08-2018, 03:27 AM
Last Post: woooee
  when I type either C B or A nothing appears Samp97 3 3,699 Aug-15-2018, 06:36 AM
Last Post: DuaneJack
  Find how many times a user played an artist and how many times disruptfwd8 1 3,370 May-04-2018, 08:32 AM
Last Post: killerrex
  Search for Player ID and return games played and number of times disruptfwd8 3 4,364 May-03-2018, 06:45 PM
Last Post: disruptfwd8

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020