← Back to team overview

python-quantities-developers team mailing list archive

Fwd: big speedups today in quantities

 

---------- Forwarded message ----------
From: John Salvatier <jsalvatier@xxxxxxxxx>
Date: Thu, Jan 22, 2009 at 6:36 PM
Subject: Re: [Python-quantities-developers] big speedups today in quantities
To: Darren Dale <dsdale24@xxxxxxxxx>


Good point.

On Thu, Jan 22, 2009 at 6:35 PM, Darren Dale <dsdale24@xxxxxxxxx> wrote:

> I think .dimensionality returns a copy, since we want to discourage people
> from attempting to modify the dimensionality of a quantity directly.
> Internally, we can use ._dimensionality when we dont need a new copy.
>
>
> On Thu, Jan 22, 2009 at 9:28 PM, John Salvatier <jsalvatier@xxxxxxxxx>wrote:
>
>> Is it acceptable to use .dimensionality since this just returns
>> ._dimensionality?
>>
>> On Thu, Jan 22, 2009 at 6:26 PM, Darren Dale <dsdale24@xxxxxxxxx> wrote:
>>
>>> I was following code execution using eric4's tools today, trying to
>>> identify why it was taking so long to load the constants module. I found a
>>> number of ways to streamline the instantiation of Quantity and its
>>> subclasses, optimized UnitQuantity.simplified, and the biggest optimization
>>> by far was to use ._dimensionality for internal comparisons instead of
>>> .units, wherever possible. The unit tests now run in about 0.6 seconds, they
>>> were taking 2 seconds.
>>>
>>> I tagged a 0.5a2 release and loaded it up at PyPI. There is still lots to
>>> do before I make an announcement, but I wanted to make a source dist
>>> available so people I work with can download it and provide some feedback.
>>>
>>> Darren
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~python-quantities-developers<https://launchpad.net/%7Epython-quantities-developers>
>>> Post to     : python-quantities-developers@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~python-quantities-developers<https://launchpad.net/%7Epython-quantities-developers>
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>

References