Re: [Cython] Hash-based vtables

2012-06-05 Thread Dag Sverre Seljebotn
On 06/05/2012 10:50 PM, Robert Bradshaw wrote: On Tue, Jun 5, 2012 at 1:10 PM, Dag Sverre Seljebotn wrote: On 06/04/2012 11:43 PM, Robert Bradshaw wrote: On Mon, Jun 4, 2012 at 1:55 PM, Dag Sverre Seljebotn wrote: On 06/04/2012 09:44 PM, Dag Sverre Seljebotn wrote: Me and Robert had

Re: [Cython] Hash-based vtables

2012-06-05 Thread Robert Bradshaw
On Tue, Jun 5, 2012 at 1:10 PM, Dag Sverre Seljebotn wrote: > On 06/04/2012 11:43 PM, Robert Bradshaw wrote: >> >> On Mon, Jun 4, 2012 at 1:55 PM, Dag Sverre Seljebotn >>  wrote: >>> >>> On 06/04/2012 09:44 PM, Dag Sverre Seljebotn wrote: Me and Robert had a long discussion on the

Re: [Cython] Hash-based vtables

2012-06-05 Thread mark florisson
On 5 June 2012 20:33, Dag Sverre Seljebotn wrote: > On 06/05/2012 08:02 PM, mark florisson wrote: >> >> On 5 June 2012 18:09, Dag Sverre Seljebotn >>  wrote: >>> >>> On 06/05/2012 07:01 PM, Dag Sverre Seljebotn wrote: On 06/05/2012 09:25 AM, Stefan Behnel wrote: > > > Da

Re: [Cython] Hash-based vtables

2012-06-05 Thread Dag Sverre Seljebotn
On 06/04/2012 11:43 PM, Robert Bradshaw wrote: On Mon, Jun 4, 2012 at 1:55 PM, Dag Sverre Seljebotn wrote: On 06/04/2012 09:44 PM, Dag Sverre Seljebotn wrote: Me and Robert had a long discussion on the NumFOCUS list about this already, but I figured it was better to continue it and provide m

Re: [Cython] Hash-based vtables

2012-06-05 Thread Dag Sverre Seljebotn
On 06/05/2012 08:02 PM, mark florisson wrote: On 5 June 2012 18:09, Dag Sverre Seljebotn wrote: On 06/05/2012 07:01 PM, Dag Sverre Seljebotn wrote: On 06/05/2012 09:25 AM, Stefan Behnel wrote: Dag Sverre Seljebotn, 04.06.2012 21:44: This can cause crashes/stack smashes etc. if there's low

Re: [Cython] Hash-based vtables

2012-06-05 Thread mark florisson
On 5 June 2012 18:09, Dag Sverre Seljebotn wrote: > On 06/05/2012 07:01 PM, Dag Sverre Seljebotn wrote: >> >> On 06/05/2012 09:25 AM, Stefan Behnel wrote: >>> >>> Dag Sverre Seljebotn, 04.06.2012 21:44: This can cause crashes/stack smashes etc. if there's lower-64bit-of-md5 collisio

Re: [Cython] Hash-based vtables

2012-06-05 Thread Dag Sverre Seljebotn
On 06/05/2012 07:01 PM, Dag Sverre Seljebotn wrote: On 06/05/2012 09:25 AM, Stefan Behnel wrote: Dag Sverre Seljebotn, 04.06.2012 21:44: This can cause crashes/stack smashes etc. if there's lower-64bit-of-md5 collisions, but a) the probability is incredibly small, b) it would only matter in sit

Re: [Cython] Hash-based vtables

2012-06-05 Thread Dag Sverre Seljebotn
On 06/05/2012 09:25 AM, Stefan Behnel wrote: Dag Sverre Seljebotn, 04.06.2012 21:44: This can cause crashes/stack smashes etc. if there's lower-64bit-of-md5 collisions, but a) the probability is incredibly small, b) it would only matter in situations that should cause an Attribut

Re: [Cython] Hash-based vtables

2012-06-05 Thread Dag Sverre Seljebotn
On 06/05/2012 11:16 AM, Robert Bradshaw wrote: On Tue, Jun 5, 2012 at 1:07 AM, Stefan Behnel wrote: Dag Sverre Seljebotn, 05.06.2012 00:07: The C FAQ says 'if you know the contents of your hash table up front you can devise a perfect hash', but no details, probably just hand-waving. 128 bits

Re: [Cython] Hash-based vtables

2012-06-05 Thread Robert Bradshaw
On Tue, Jun 5, 2012 at 1:07 AM, Stefan Behnel wrote: > Dag Sverre Seljebotn, 05.06.2012 00:07: >> The C FAQ says 'if you know the contents of your hash table up front you can >> devise a perfect hash', but no details, probably just hand-waving. >> >> 128 bits gives more entropy for perfect hashin

Re: [Cython] Hash-based vtables

2012-06-05 Thread Stefan Behnel
Dag Sverre Seljebotn, 05.06.2012 00:07: > The C FAQ says 'if you know the contents of your hash table up front you can > devise a perfect hash', but no details, probably just hand-waving. > > 128 bits gives more entropy for perfect hashing: some but not much since each > shift r is hardwired to

Re: [Cython] Hash-based vtables

2012-06-05 Thread Stefan Behnel
Dag Sverre Seljebotn, 04.06.2012 21:44: >This can cause crashes/stack smashes >etc. if there's lower-64bit-of-md5 collisions, but a) the >probability is incredibly small, b) it would only matter in >situations that should cause an AttributeError anyway, c) if we >really care, we