Message169800
Am 02.09.2012 16:21, schrieb Alexander Belopolsky:
> I have refrained from voting because in my line of work buffers or
> memoryviews deal with large objects that rarely serve as dictionary
> keys. As a result, I have zero experince with hashing of buffers.
> This observation supports the current consensus to limit hashing to
> 1d and 0d cases. My only concern is that with hash(m) ==
> hash(m.tobytes()) implementing multidimensional restriction will
> require artificial if ndim > 1 check and an extra sentence in the
> docs while not simplifying anything.
As for the "not simplifying argument": if hashing was restricted
to contiguous bytes, then the implementation would certainly be
simplified quite a bit: currently, if it's not contiguous, it needs
to make a separate copy and hash that. This code could go away
if hashing would only work for true memory "blocks". |
|
Date |
User |
Action |
Args |
2012-09-03 19:59:03 | loewis | set | recipients:
+ loewis, georg.brandl, mark.dickinson, ncoghlan, belopolsky, pitrou, vstinner, christian.heimes, Arfrever, skrah, meador.inge, Alexander.Belopolsky, python-dev, Dag.Sverre.Seljebotn |
2012-09-03 19:59:02 | loewis | link | issue15814 messages |
2012-09-03 19:59:02 | loewis | create | |
|