Re: list comparison vs integer comparison, which is more efficient?

2015-01-05 Thread Jonas Wielicki
On 04.01.2015 13:17, austin aigbe wrote Hi Terry, No difference between the int and list comparison in terms of the number of calls(24) and time (0.004s). Main part is the repeated call to sqrt(). However, it took a shorter time (0.004s) with 24 function calls than your code (0.005s)

Re: list comparison vs integer comparison, which is more efficient?

2015-01-04 Thread austin aigbe
On Sunday, January 4, 2015 8:12:10 AM UTC+1, Terry Reedy wrote: On 1/3/2015 6:19 PM, austin aigbe wrote: I am currently implementing the LTE physical layer in Python (ver 2.7.7). For the qpsk, 16qam and 64qam modulation I would like to know which is more efficient to use, between an

Re: list comparison vs integer comparison, which is more efficient?

2015-01-04 Thread austin aigbe
On Sunday, January 4, 2015 12:20:26 PM UTC+1, austin aigbe wrote: On Sunday, January 4, 2015 8:12:10 AM UTC+1, Terry Reedy wrote: On 1/3/2015 6:19 PM, austin aigbe wrote: I am currently implementing the LTE physical layer in Python (ver 2.7.7). For the qpsk, 16qam and 64qam modulation

Re: list comparison vs integer comparison, which is more efficient?

2015-01-04 Thread Christian Gollwitzer
Am 04.01.15 um 13:17 schrieb austin aigbe: However, it took a shorter time (0.004s) with 24 function calls than your code (0.005s) which took just 13 function calls to execute. Why is this? These times are way too short for conclusive results. Typically, the OS timer operates with a

Re: list comparison vs integer comparison, which is more efficient?

2015-01-04 Thread Mark Lawrence
On 04/01/2015 12:22, Christian Gollwitzer wrote: Am 04.01.15 um 13:17 schrieb austin aigbe: However, it took a shorter time (0.004s) with 24 function calls than your code (0.005s) which took just 13 function calls to execute. Why is this? These times are way too short for conclusive

Re: list comparison vs integer comparison, which is more efficient?

2015-01-04 Thread Chris Angelico
On Sun, Jan 4, 2015 at 11:17 PM, austin aigbe eshik...@gmail.com wrote: However, it took a shorter time (0.004s) with 24 function calls than your code (0.005s) which took just 13 function calls to execute. Why is this? That looks to me like noise in your stats. One ULP in timing stats? Not

Re: list comparison vs integer comparison, which is more efficient?

2015-01-03 Thread Chris Angelico
On Sun, Jan 4, 2015 at 10:19 AM, austin aigbe eshik...@gmail.com wrote: I would like to know which is more efficient to use, between an integer comparison and a list comparison: You can test them with the timeit module, but my personal suspicion is that any difference between them will be

list comparison vs integer comparison, which is more efficient?

2015-01-03 Thread austin aigbe
Hi, I am currently implementing the LTE physical layer in Python (ver 2.7.7). For the qpsk, 16qam and 64qam modulation I would like to know which is more efficient to use, between an integer comparison and a list comparison: Integer comparison: bit_pair as an integer value before comparison

Re: list comparison vs integer comparison, which is more efficient?

2015-01-03 Thread Terry Reedy
On 1/3/2015 6:19 PM, austin aigbe wrote: I am currently implementing the LTE physical layer in Python (ver 2.7.7). For the qpsk, 16qam and 64qam modulation I would like to know which is more efficient to use, between an integer comparison and a list comparison: Integer comparison: bit_pair as