>> On a 32-bit system, the dictionary can have up to 2**31 slots,
>> meaning that the maximum number of keys is slightly smaller
>> (about 2**30).
>
> Which, in practice, means that the size is limited by the available memory.
Right. Each slot takes 12 bytes, so the storage for the slots alone
wo
Martin v. Löwis wrote:
> intellimi...@gmail.com wrote:
>> Is there a limit to the size or number of entries that a single
>> dictionary can possess?
>
> On a 32-bit system, the dictionary can have up to 2**31 slots,
> meaning that the maximum number of keys is slightly smaller
> (about 2**30).
W
intellimi...@gmail.com wrote:
> Is there a limit to the size or number of entries that a single
> dictionary can possess?
On a 32-bit system, the dictionary can have up to 2**31 slots,
meaning that the maximum number of keys is slightly smaller
(about 2**30).
As others have pointed out, Python's
intellimi...@gmail.com wrote:
> Ummm, I didn't know about the dbm databases. It seems there are many
> different
> modules for this kind of tasks: gdbm, berkeley db, cdb, etc. I'm
> needing to implement
> a constant hashtable with a large number of keys, but only a small
> fraction of them
> will b
On Feb 21, 6:47 pm, Stefan Behnel wrote:
> intellimi...@gmail.com wrote:
> > I wrote a script to process textual data and extract phrases from
> > them, storing these phrases in a dictionary. It encounters a
> > MemoryError when there are about 11.18M keys in the dictionary, and
> > the size is ab
Stefan Behnel wrote:
intellimi...@gmail.com wrote:
You may be better served with one of the dbm databases that come with
Python. They live on-disk but do the usual in-memory caching. They'll
likely perform a lot better than your OS level swap file.
Stefan
the bsddb module has the feature that
intellimi...@gmail.com wrote:
> I wrote a script to process textual data and extract phrases from
> them, storing these phrases in a dictionary. It encounters a
> MemoryError when there are about 11.18M keys in the dictionary, and
> the size is about 1.5GB.
> [...]
> I have 1GB of pysical memory an
On Feb 21, 6:25 pm, Tino Wildenhain wrote:
> intellimi...@gmail.com wrote:
> > I wrote a script to process textual data and extract phrases from
> > them, storing these phrases in a dictionary. It encounters a
> > MemoryError when there are about 11.18M keys in the dictionary, and
> > the size is
intellimi...@gmail.com wrote:
I wrote a script to process textual data and extract phrases from
them, storing these phrases in a dictionary. It encounters a
MemoryError when there are about 11.18M keys in the dictionary, and
the size is about 1.5GB. I tried multiple times, and the error occurs
ev
I wrote a script to process textual data and extract phrases from
them, storing these phrases in a dictionary. It encounters a
MemoryError when there are about 11.18M keys in the dictionary, and
the size is about 1.5GB. I tried multiple times, and the error occurs
everytime at exactly the same plac
10 matches
Mail list logo