Re: How to increase the speed of this program?



John Machin wrote:

Thanks, that's indeed faster than array(t, [v]*n) but what I had in
mind was something like an additional constructor:

array.filledarray(typecode, repeat_value, repeat_count)

which I speculate should be even faster.

before you add a new API, you should probably start by borrowing the repeat code from Object/stringobject.c and see if the speedup is good enough.

</F>

.



Relevant Pages

  • RE: Unit testing - suitable for all development?
    ... > and you want to test the constructor. ... I find it's important to follow the following procedure when creating a new module, to get me into the right frame of mind. ... Write the simplest test for the module (syntax). ...
    (comp.lang.python)
  • [RFCLUE4] scatterlist changes
    ... I have just tripped over the scatterlist changes in my out-of-tree ... drivers. ... When the API stabilizes... ... It does bring to mind a simple question: ...
    (Linux-Kernel)
  • Re: Porting from Windows to Linux
    ... constructor is to create one such polynomial of degree i. ... > compiler optimisations in mind. ... I did not have any compiler optimizations in mind. ... provide the implementations of all the constructors. ...
    (comp.lang.cpp)
  • Re: reference counting.. continued..
    ... lian Elischer writes: ... >There are several goals that need to be kept in mind. ... Please, whatever you do, show that your API will deal with the ...
    (freebsd-arch)
  • Re: FAQ Suggestions
    ... Have you thought of allowing your FAQs to be compiled on a Wiki server? ... In my mind, the advantage would be that the FAQs can be honed by the ... > constructor for a reference type, you just get given one if you don't ...
    (microsoft.public.dotnet.languages.csharp)