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.00
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 results
On Sun, Jan 4, 2015 at 11:17 PM, austin aigbe 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 something to bas
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 millise
gt; 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
> > >
>
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
> > e
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
On Sun, Jan 4, 2015 at 10:19 AM, austin aigbe 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 utter
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
Dustan wrote:
> Fredrik Lundh wrote:
>> are you for real?
> And what exactly is that supposed to mean?
The obscurity in that communication is probably caused by the instance
of the effbot with which you have been corresponding having been
invoked with mildmannered=True -- apparently this is not t
Fredrik Lundh wrote:
> Dustan wrote:
>
> > The task manager says "CPU Usage: 100%" when the program is running,
> > and only when the program is running.
> >
> > Efficiency is a measure of 2 things: CPU usage and time. If you measure
> > just time, you're not necessarily getting the efficiency.
>
Dustan wrote:
> The task manager says "CPU Usage: 100%" when the program is running,
> and only when the program is running.
>
> Efficiency is a measure of 2 things: CPU usage and time. If you measure
> just time, you're not necessarily getting the efficiency.
are you for real?
--
http://m
"Dustan" <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
>
> The task manager says "CPU Usage: 100%" when the program is
> running, and only when the program is running.
>
> Efficiency is a measure of 2 things: CPU usage and time. If you
> measure just time, you're not necessarily getting
Dustan wrote:
> Fredrik Lundh wrote:
> > Dustan wrote:
> >
> > > Obviously it takes a geek to know you have to time it, as opposed to
> > > any other task you could be talking about.
> >
> > wasn't the original question "my program uses a lot of CPU, and I want
> > to make it more efficient" ? wha
Fredrik Lundh wrote:
> Dustan wrote:
>
> > Obviously it takes a geek to know you have to time it, as opposed to
> > any other task you could be talking about.
>
> wasn't the original question "my program uses a lot of CPU, and I want
> to make it more efficient" ? what does "a lot of CPU" and "mo
Dustan wrote:
> Obviously it takes a geek to know you have to time it, as opposed to
> any other task you could be talking about.
wasn't the original question "my program uses a lot of CPU, and I want
to make it more efficient" ? what does "a lot of CPU" and "more
efficient" mean to you, and h
Fredrik Lundh wrote:
> Dustan wrote:
>
> >> 2. Measure it.
> >
> > Tell me how and I will; I'm not nearly that much of a geek
> > unfortunately.
>
> do you have to be a geek to be able to measure how much time
> something takes?
Obviously it takes a geek to know you have to time it, as opposed to
Dustan wrote:
>> 2. Measure it.
>
> Tell me how and I will; I'm not nearly that much of a geek
> unfortunately.
do you have to be a geek to be able to measure how much time
something takes?
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh wrote:
> Dustan wrote:
>
> > I have a program that uses up a lot of CPU and want to make it is
> > efficient as possible with what I have to work with it. So which of the
> > following would be more efficient, knowing that l is a list and size is
> > a number?
> >
> > l=l[:size]
> >
"Dustan" <[EMAIL PROTECTED]> writes:
> John Machin wrote:
> > 2. Measure it.
>
> Tell me how and I will; I'm not nearly that much of a geek
> unfortunately.
You've already been told. Here it is again:
http://docs.python.org/lib/profile.html>
--
\ "I don't know half of you half as we
John Machin wrote:
> 1. Think about it. The first case will make a new list and copy "size"
> *objects. When the assignment happens, the old list has its reference
> count decremented. Not very memory-friendly. The second case merely
> truncates the existing list in situ. Bit hard to imagine how t
1. Think about it. The first case will make a new list and copy "size"
*objects. When the assignment happens, the old list has its reference
count decremented. Not very memory-friendly. The second case merely
truncates the existing list in situ. Bit hard to imagine how the first
case could ever be
Dustan wrote:
> I have a program that uses up a lot of CPU and want to make it is
> efficient as possible with what I have to work with it. So which of the
> following would be more efficient, knowing that l is a list and size is
> a number?
>
> l=l[:size]
> del l[size:]
since you have the progr
"Dustan" <[EMAIL PROTECTED]> writes:
> I have a program that uses up a lot of CPU and want to make it is
> efficient as possible with what I have to work with it.
Profile your program and find the precise parts that are the
slowest. Attempting to optimise before that is a waste of your time.
> S
Measure it and find out. Sounds like a little investment in your time
learning how to measure performance may pay dividends for you.
--
http://mail.python.org/mailman/listinfo/python-list
I have a program that uses up a lot of CPU and want to make it is
efficient as possible with what I have to work with it. So which of the
following would be more efficient, knowing that l is a list and size is
a number?
l=l[:size]
del l[size:]
If it makes a difference, everything in the list is m
26 matches
Mail list logo