Alien-Judy

 view release on metacpan or  search on metacpan

inc/My/Judy/Builder.pm  view on Meta::CPAN

        _chdir_to_judy();
        
        $self->_run(MAKE())
            or do {
                warn "building Judy failed";
                _chdir_back();
                return 0;
            };

        # "Install" a minor copy of Judy.h and libJudy.so to my own
        # blib/arch/Alien/Judy because it looks like some CPAN smokers
        # don't install dependencies but just adjust @INC to point
        # into depended-on- blib/* directories.
        my $alien = File::Spec->catdir( $Orig_CWD, 'blib', 'arch', 'Alien', 'Judy' );
        File::Path::make_path( $alien );
        my @files = (
            'src/Judy.h',
            glob('src/obj/.libs/*'),
        );
        for my $file ( @files ) {
            File::Copy::copy( $file, $alien );

src/judy-1.0.5/aclocal.m4  view on Meta::CPAN


    linux* | k*bsd*-gnu)
      case $cc_basename in
      icc* | ecc*)
	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
        ;;
      pgcc* | pgf77* | pgf90* | pgf95*)
        # Portland Group compilers (*not* the Pentium gcc compiler,
	# which looks to be a dead project)
	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
        ;;
      ccc*)
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
        # All Alpha code is PIC.
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
        ;;
      esac

src/judy-1.0.5/autom4te.cache/output.0  view on Meta::CPAN

	# certainly right.
	break;;
    *.* )
        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
	then :; else
	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
	fi
	# We set ac_cv_exeext here because the later test for it is not
	# safe: cross compilers may not add the suffix if given an `-o'
	# argument, so we may need to know it at that point already.
	# Even if this section looks crufty: it has the advantage of
	# actually working.
	break;;
    * )
	break;;
  esac
done
test "$ac_cv_exeext" = no && ac_cv_exeext=

else
  ac_file=''

src/judy-1.0.5/autom4te.cache/output.0  view on Meta::CPAN


    linux* | k*bsd*-gnu)
      case $cc_basename in
      icc* | ecc*)
	lt_prog_compiler_wl='-Wl,'
	lt_prog_compiler_pic='-KPIC'
	lt_prog_compiler_static='-static'
        ;;
      pgcc* | pgf77* | pgf90* | pgf95*)
        # Portland Group compilers (*not* the Pentium gcc compiler,
	# which looks to be a dead project)
	lt_prog_compiler_wl='-Wl,'
	lt_prog_compiler_pic='-fpic'
	lt_prog_compiler_static='-Bstatic'
        ;;
      ccc*)
        lt_prog_compiler_wl='-Wl,'
        # All Alpha code is PIC.
        lt_prog_compiler_static='-non_shared'
        ;;
      esac

src/judy-1.0.5/autom4te.cache/output.0  view on Meta::CPAN


    linux* | k*bsd*-gnu)
      case $cc_basename in
      icc* | ecc*)
	lt_prog_compiler_wl_F77='-Wl,'
	lt_prog_compiler_pic_F77='-KPIC'
	lt_prog_compiler_static_F77='-static'
        ;;
      pgcc* | pgf77* | pgf90* | pgf95*)
        # Portland Group compilers (*not* the Pentium gcc compiler,
	# which looks to be a dead project)
	lt_prog_compiler_wl_F77='-Wl,'
	lt_prog_compiler_pic_F77='-fpic'
	lt_prog_compiler_static_F77='-Bstatic'
        ;;
      ccc*)
        lt_prog_compiler_wl_F77='-Wl,'
        # All Alpha code is PIC.
        lt_prog_compiler_static_F77='-non_shared'
        ;;
      esac

src/judy-1.0.5/autom4te.cache/output.0  view on Meta::CPAN


    linux* | k*bsd*-gnu)
      case $cc_basename in
      icc* | ecc*)
	lt_prog_compiler_wl_GCJ='-Wl,'
	lt_prog_compiler_pic_GCJ='-KPIC'
	lt_prog_compiler_static_GCJ='-static'
        ;;
      pgcc* | pgf77* | pgf90* | pgf95*)
        # Portland Group compilers (*not* the Pentium gcc compiler,
	# which looks to be a dead project)
	lt_prog_compiler_wl_GCJ='-Wl,'
	lt_prog_compiler_pic_GCJ='-fpic'
	lt_prog_compiler_static_GCJ='-Bstatic'
        ;;
      ccc*)
        lt_prog_compiler_wl_GCJ='-Wl,'
        # All Alpha code is PIC.
        lt_prog_compiler_static_GCJ='-non_shared'
        ;;
      esac

src/judy-1.0.5/autom4te.cache/output.1  view on Meta::CPAN

	# certainly right.
	break;;
    *.* )
        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
	then :; else
	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
	fi
	# We set ac_cv_exeext here because the later test for it is not
	# safe: cross compilers may not add the suffix if given an `-o'
	# argument, so we may need to know it at that point already.
	# Even if this section looks crufty: it has the advantage of
	# actually working.
	break;;
    * )
	break;;
  esac
done
test "$ac_cv_exeext" = no && ac_cv_exeext=

else
  ac_file=''

src/judy-1.0.5/autom4te.cache/output.1  view on Meta::CPAN


    linux* | k*bsd*-gnu)
      case $cc_basename in
      icc* | ecc*)
	lt_prog_compiler_wl='-Wl,'
	lt_prog_compiler_pic='-KPIC'
	lt_prog_compiler_static='-static'
        ;;
      pgcc* | pgf77* | pgf90* | pgf95*)
        # Portland Group compilers (*not* the Pentium gcc compiler,
	# which looks to be a dead project)
	lt_prog_compiler_wl='-Wl,'
	lt_prog_compiler_pic='-fpic'
	lt_prog_compiler_static='-Bstatic'
        ;;
      ccc*)
        lt_prog_compiler_wl='-Wl,'
        # All Alpha code is PIC.
        lt_prog_compiler_static='-non_shared'
        ;;
      esac

src/judy-1.0.5/autom4te.cache/output.1  view on Meta::CPAN


    linux* | k*bsd*-gnu)
      case $cc_basename in
      icc* | ecc*)
	lt_prog_compiler_wl_F77='-Wl,'
	lt_prog_compiler_pic_F77='-KPIC'
	lt_prog_compiler_static_F77='-static'
        ;;
      pgcc* | pgf77* | pgf90* | pgf95*)
        # Portland Group compilers (*not* the Pentium gcc compiler,
	# which looks to be a dead project)
	lt_prog_compiler_wl_F77='-Wl,'
	lt_prog_compiler_pic_F77='-fpic'
	lt_prog_compiler_static_F77='-Bstatic'
        ;;
      ccc*)
        lt_prog_compiler_wl_F77='-Wl,'
        # All Alpha code is PIC.
        lt_prog_compiler_static_F77='-non_shared'
        ;;
      esac

src/judy-1.0.5/autom4te.cache/output.1  view on Meta::CPAN


    linux* | k*bsd*-gnu)
      case $cc_basename in
      icc* | ecc*)
	lt_prog_compiler_wl_GCJ='-Wl,'
	lt_prog_compiler_pic_GCJ='-KPIC'
	lt_prog_compiler_static_GCJ='-static'
        ;;
      pgcc* | pgf77* | pgf90* | pgf95*)
        # Portland Group compilers (*not* the Pentium gcc compiler,
	# which looks to be a dead project)
	lt_prog_compiler_wl_GCJ='-Wl,'
	lt_prog_compiler_pic_GCJ='-fpic'
	lt_prog_compiler_static_GCJ='-Bstatic'
        ;;
      ccc*)
        lt_prog_compiler_wl_GCJ='-Wl,'
        # All Alpha code is PIC.
        lt_prog_compiler_static_GCJ='-non_shared'
        ;;
      esac

src/judy-1.0.5/autom4te.cache/traces.0  view on Meta::CPAN


    linux* | k*bsd*-gnu)
      case $cc_basename in
      icc* | ecc*)
	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
        ;;
      pgcc* | pgf77* | pgf90* | pgf95*)
        # Portland Group compilers (*not* the Pentium gcc compiler,
	# which looks to be a dead project)
	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
        ;;
      ccc*)
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
        # All Alpha code is PIC.
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
        ;;
      esac

src/judy-1.0.5/configure  view on Meta::CPAN

	# certainly right.
	break;;
    *.* )
        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
	then :; else
	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
	fi
	# We set ac_cv_exeext here because the later test for it is not
	# safe: cross compilers may not add the suffix if given an `-o'
	# argument, so we may need to know it at that point already.
	# Even if this section looks crufty: it has the advantage of
	# actually working.
	break;;
    * )
	break;;
  esac
done
test "$ac_cv_exeext" = no && ac_cv_exeext=

else
  ac_file=''

src/judy-1.0.5/configure  view on Meta::CPAN


    linux* | k*bsd*-gnu)
      case $cc_basename in
      icc* | ecc*)
	lt_prog_compiler_wl='-Wl,'
	lt_prog_compiler_pic='-KPIC'
	lt_prog_compiler_static='-static'
        ;;
      pgcc* | pgf77* | pgf90* | pgf95*)
        # Portland Group compilers (*not* the Pentium gcc compiler,
	# which looks to be a dead project)
	lt_prog_compiler_wl='-Wl,'
	lt_prog_compiler_pic='-fpic'
	lt_prog_compiler_static='-Bstatic'
        ;;
      ccc*)
        lt_prog_compiler_wl='-Wl,'
        # All Alpha code is PIC.
        lt_prog_compiler_static='-non_shared'
        ;;
      esac

src/judy-1.0.5/configure  view on Meta::CPAN


    linux* | k*bsd*-gnu)
      case $cc_basename in
      icc* | ecc*)
	lt_prog_compiler_wl_F77='-Wl,'
	lt_prog_compiler_pic_F77='-KPIC'
	lt_prog_compiler_static_F77='-static'
        ;;
      pgcc* | pgf77* | pgf90* | pgf95*)
        # Portland Group compilers (*not* the Pentium gcc compiler,
	# which looks to be a dead project)
	lt_prog_compiler_wl_F77='-Wl,'
	lt_prog_compiler_pic_F77='-fpic'
	lt_prog_compiler_static_F77='-Bstatic'
        ;;
      ccc*)
        lt_prog_compiler_wl_F77='-Wl,'
        # All Alpha code is PIC.
        lt_prog_compiler_static_F77='-non_shared'
        ;;
      esac

src/judy-1.0.5/configure  view on Meta::CPAN


    linux* | k*bsd*-gnu)
      case $cc_basename in
      icc* | ecc*)
	lt_prog_compiler_wl_GCJ='-Wl,'
	lt_prog_compiler_pic_GCJ='-KPIC'
	lt_prog_compiler_static_GCJ='-static'
        ;;
      pgcc* | pgf77* | pgf90* | pgf95*)
        # Portland Group compilers (*not* the Pentium gcc compiler,
	# which looks to be a dead project)
	lt_prog_compiler_wl_GCJ='-Wl,'
	lt_prog_compiler_pic_GCJ='-fpic'
	lt_prog_compiler_static_GCJ='-Bstatic'
        ;;
      ccc*)
        lt_prog_compiler_wl_GCJ='-Wl,'
        # All Alpha code is PIC.
        lt_prog_compiler_static_GCJ='-non_shared'
        ;;
      esac

src/judy-1.0.5/src/JudyCommon/JudyCount.c  view on Meta::CPAN

// J U D Y   C O U N T   L E A F   B 1
//
// This is a private analog of the j__udySearchLeaf*() functions for counting
// in bitmap 1-byte leaves.  Since a bitmap leaf describes Indexes digitally
// rather than linearly, this is not really a search, but just a count of the
// valid Indexes == set bits below or including Index, which should be valid.
// Return the "offset" (really the ordinal), 0 .. Pop1 - 1, of Index in Pjll;
// if Indexs bit is not set (which should never happen, so this is DEBUG-mode
// only), return the 1s-complement equivalent (== negative offset minus 1).
//
// Note:  The source code for this function looks identical for both Judy1 and
// JudyL, but the JU_JLB_BITMAP macro varies.
//
// Note:  For simpler calling, the first arg is of type Pjll_t but then cast to
// Pjlb_t.

FUNCTION static int j__udyCountLeafB1(
const	Pjll_t	Pjll,		// bitmap leaf, as Pjll_t for consistency.
const	Word_t	Pop1,		// Population of whole leaf.
const	Word_t	Index)		// to which to count.
{

src/judy-1.0.5/src/JudyCommon/JudyIns.c  view on Meta::CPAN


        } // switch on JP type

        {

#ifdef SUBEXPCOUNTS

// This code might seem strange here.  However it saves some memory read time
// during insert (~70nS) because a pipelined processor does not need to "stall"
// waiting for the memory read to complete.  Hope the compiler is not too smart
// or dumb and moves the code down to where it looks like it belongs (below a
// few lines).

            Word_t SubExpCount = 0;     // current subexpanse counter.

            if (PSubExp != (PWord_t) NULL)      // only if BranchB/U.
                SubExpCount = PSubExp[0];
#endif

// PROCESS JP -- RECURSIVELY:
//

src/judy-1.0.5/src/JudyCommon/JudyPrevNext.c  view on Meta::CPAN

// - "lowest"     => "highest"
// - "next-left"  => "next-right"
// - "right-most" => "left-most"
//
// Note:  SM3Findlimit could be called SM3Findmax/SM3Findmin, but a common name
// for both Prev and Next means many fewer ifdefs in this code.
//
// TBD:  Currently this code traverses a JP whether its expanse is partially or
// completely full (populated).  For Judy1 (only), since there is no value area
// needed, consider shortcutting to a "success" return upon encountering a full
// JP in SM1Get (or even SM3Findlimit?)  A full JP looks like this:
//
//	(((JU_JPDCDPOP0(Pjp) ^ cJU_ALLONES) & cJU_POP0MASK(cLevel)) == 0)

#ifdef JUDY1
#ifdef JUDYPREV
FUNCTION int Judy1Prev
#else
FUNCTION int Judy1Next
#endif
#else

src/judy-1.0.5/src/JudyCommon/JudyPrevNext.c  view on Meta::CPAN

	PJError_t PJError	// optional, for returning error info.
        )
{
	Pjp_t	  Pjp, Pjp2;	// current JPs.
	Pjbl_t	  Pjbl;		// Pjp->jp_Addr masked and cast to types:
	Pjbb_t	  Pjbb;
	Pjbu_t	  Pjbu;

// Note:  The following initialization is not strictly required but it makes
// gcc -Wall happy because there is an "impossible" path from Immed handling to
// SM1LeafLImm code that looks like Pjll might be used before set:

	Pjll_t	  Pjll = (Pjll_t) NULL;
	Word_t	  state;	// current state in SM.
	Word_t	  digit;	// next digit to decode from Index.

// Note:  The following initialization is not strictly required but it makes
// gcc -Wall happy because there is an "impossible" path from Immed handling to
// SM1LeafLImm code (for JudyL & JudyPrev only) that looks like pop1 might be
// used before set:

#if (defined(JUDYL) && defined(JUDYPREV))
	Word_t	  pop1 = 0;	// in a leaf.
#else
	Word_t	  pop1;		// in a leaf.
#endif
	int	  offset;	// linear branch/leaf, from j__udySearchLeaf*().
	int	  subexp;	// subexpanse in a bitmap branch.
	Word_t	  bitposmask;	// bit in bitmap for Index.

src/judy-1.0.5/test/SLcompare.c  view on Meta::CPAN

Many thanks to J.  Zobel for supplying the code for Hash, Splay and 
Redblack algorithms.  

I will be including more algorithms as people donate code for testing.

The Judy code is available at: <http://sourceforge.net/projects/judy>
9/2002 (dlb).

This is the output of this program when run on a 750Mhz P3 laptop.

This output is using a file available from www.google.com.  It looks 
like 'http' web pages and was one of the files used in a March 2002 
contest by www.google.com

 wc google/data/repos.00
 3440314 14613027 162822437 google/data/repos.00

   lines avg_linelen  getline   stored RAMused/line  store/ln lookup/ln ADT
 2807737   58.0 byts 0.856 uS  1455201   104.0 byts  4.859 uS  4.566 uS SPLAY
 2807737   58.0 byts 0.862 uS  1455201    96.0 byts  2.523 uS  2.101 uS HASH
 2807737   58.0 byts 0.856 uS  1455201   104.0 byts  4.601 uS  4.001 uS REDBLK

src/judy-1.0.5/test/malloc-pre2.8a.c  view on Meta::CPAN


    Chunks of memory are maintained using a `boundary tag' method as
    described in e.g., Knuth or Standish.  (See the paper by Paul
    Wilson ftp://ftp.cs.utexas.edu/pub/garbage/allocsrv.ps for a
    survey of such techniques.)  Sizes of free chunks are stored both
    in the front of each chunk and at the end.  This makes
    consolidating fragmented chunks into bigger chunks very fast.  The
    size fields also hold bits representing whether chunks are free or
    in use.

    An allocated chunk looks like this:


    chunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
            |             Size of previous chunk, if allocated            | |
            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
            |             Size of chunk, in bytes                         |P|
      mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
            |             User data starts here...                          .
            .                                                               .
            .             (malloc_usable_space() bytes)                     .



( run in 0.658 second using v1.01-cache-2.11-cpan-64827b87656 )