RE: Comparing caching strategies

2023-02-16 Thread avi.e.gross
I am less interested in the choice of names than the pro and con of when these Roaring bitmaps are worth using and when they are not. It is a bit like discussing whether various compression techniques are worth using as the storage or memory costs can be weighed against the CPU or transient

Re: Comparing caching strategies

2023-02-16 Thread Chris Angelico
On Fri, 17 Feb 2023 at 15:28, MRAB wrote: > > On 2023-02-14 22:20, Rob Cliffe via Python-list wrote: > > On 11/02/2023 00:39, Dino wrote: > >> First off, a big shout out to Peter J. Holzer, who mentioned roaring > >> bitmaps a few days ago and led me to quite a discovery. > >> > > I was intrigued

Re: Comparing caching strategies

2023-02-16 Thread MRAB
On 2023-02-14 22:20, Rob Cliffe via Python-list wrote: On 11/02/2023 00:39, Dino wrote: First off, a big shout out to Peter J. Holzer, who mentioned roaring bitmaps a few days ago and led me to quite a discovery. I was intrigued to hear about roaring bitmaps and discover they really were a

Re: Comparing caching strategies

2023-02-16 Thread Rob Cliffe via Python-list
On 11/02/2023 00:39, Dino wrote: First off, a big shout out to Peter J. Holzer, who mentioned roaring bitmaps a few days ago and led me to quite a discovery. I was intrigued to hear about roaring bitmaps and discover they really were a thing (not a typo as I suspected at first). What next, I

Re: LRU cache

2023-02-16 Thread Weatherby,Gerard
I think this does the trick: https://gist.github.com/Gerardwx/c60d200b4db8e7864cb3342dd19d41c9 #!/usr/bin/env python3 import collections import random from typing import Hashable, Any, Optional, Dict, Tuple class LruCache: """Dictionary like storage of most recently inserted values"""

Re: Precision Tail-off?

2023-02-16 Thread Peter Pearson
On Tue, 14 Feb 2023 11:17:20 +, Oscar Benjamin wrote: > On Tue, 14 Feb 2023 at 07:12, Stephen Tucker wrote: [snip] >> I have just produced the following log in IDLE (admittedly, in Python >> 2.7.10 and, yes I know that it has been superseded). >> >> It appears to show a precision tail-off as

Re: Python: How to use the 'trace' module programmatically?

2023-02-16 Thread Peter Slížik
Gerard - I did not use the filtering options. Thank you for bringing them to my attention. Barry - thank you for the insight. Now the tracing works as expected. I'm not sure why it didn't work before... Maybe the program redirected stdout? Thank you guys, Peter On Thu, Feb 16, 2023 at 9:56 AM

Re: Python: How to use the 'trace' module programmatically?

2023-02-16 Thread Barry
> On 15 Feb 2023, at 17:23, Peter Slížik wrote: > > Hello, > > I'm trying to analyze complex Python code. For some specific reasons, I > decided to use tracing instead of a debugger. > > The first thing I tried was: > > python -m trace -t /path/to/file.py > > The output of this command