[IronPython] Looping in IronPython - should it be linear?

Stanislas Pinte stan at ertmssolutions.com
Thu Feb 15 09:38:56 CET 2007


I have had issues recently with a simulation framework, using simpy and
IP, that is giving an out of memory error after +- 15 minutes...


If the looping code is costing anything non-linear, it is a serious
issue ;-)


Robert Wierschke a écrit :
> Please post the code of your loop.
> Do you instantiate objectn in your loop? I guess the memory management / garbage collection is responsible for the additional required time.
> Also the code runs in the .NET VM and the VM might do other things as well (JIT compilation, ...).
> -------- Original-Nachricht --------
> Datum: Wed, 14 Feb 2007 20:43:36 -0700
> Von: "Steve Chadwick" <steve.chadwick at gmail.com>
> An: "\'Discussion of IronPython\'" <users at lists.ironpython.com>
> CC: 
> Betreff: [IronPython] Looping in IronPython - should it be linear?
>> All,
>>         I am new to IP, and I have a silly post.  I am sure that someone
>> might be able to help me understand what is happening here (I am truly
>> impressed with the technical depth of this forum).  In trying to learn the
>> language, one of the things I do is just run a quick looping experiment
>> and
>> measure the time it takes to execute N iterations.  Up to this point, I
>> have
>> always gotten a trend that is linear, which makes sense.  
>>         However, the below graph isn't linear, and I am puzzled as to why.
>> The graph seems to suggest that the distribution has an exponential
>> component to it.  I have tested this on a couple of windows systems and
>> this
>> wasn't a fluke.  Granted, the version of IP that I am using isn't the
>> latest/greatest, but regardless of versioning, I am trying to understand
>> the
>> mechanism.  Thanks for any thoughts, and my apologies if this turns out to
>> be a silly post.
>> Sincerely,
>> Steve Chadwick

   Stanislas Pinte             e-mail: stan at ertmssolutions.com
   ERTMS Solutions               http://www.ertmssolutions.com
   Rue de l'Autonomie, 1             Tel:    + 322 - 522.06.63
   1070        Bruxelles              Fax:   + 322 - 522.09.30
   Skype (http://www.skype.com) id:                  stanpinte

More information about the Ironpython-users mailing list