-----Original Message-----
From: Greg Ewing <greg.ew...@canterbury.ac.nz> 
Sent: 15 June 2020 07:23
To: python-ideas@python.org
Subject: [Python-ideas] Re: For quicker execution, don't refcount objects that 
can't be deleted

On 15/06/20 5:11 pm, Steve Barnes wrote:

> Of course if we had a NaN value for integers, int('NaN'), then we could just 
> set the initial count to it and since NaN - anything = NaN all would be 
> golden.

Or we could use floating-point reference counts...

--
Greg
[Steve Barnes] 
I thought of floating-point reference counts but:

 a) 65535.0 -= 1 is slower than 65535 =- 1 (7.6% on my system quite a bit worse 
on some embedded systems).
 b) There comes a point in floats, (for large values of x), where x - 1 == x 
(about 10**15 which for some scientific & big data calculations is not that 
big) but unless reference counting uses python integers, rather than C, this 
will not be an issue.
 c) of course I like the concept of integer nan, inf, etc. 😊


_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/JGU6SHN56CUFKD4QGLDCORNW5BEPGKGD/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to