optimize $judy[] code (~2x speedup)