in reply to Re: Bidirectional lookup algorithm? (Updated: further info.)
in thread Bidirectional lookup algorithm? (Updated: further info.)

The integers are 64-bits. I do not know what they really look like, but there is clear danger of ending up with a sparse array growing to be much much larger than the hash.
  • Comment on Re^2: Bidirectional lookup algorithm? (Updated: further info.)

Replies are listed 'Best First'.
Re^3: Bidirectional lookup algorithm? (Updated: further info.)
by shmem (Chancellor) on Jan 05, 2015 at 22:34 UTC

    Right you are.

    qwurx [shmem] ~/comp/perl/tmp > perl -le '@a = 2**64; for(1..29){$a[2* +*$_]=$_}print `ps -o vsz= -p $$`' Out of memory!

    Having 8 GB RAM. 2**28 doesn't die.

    perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'