I just learned about Mr. Wizard's very efficient code here.
list=RandomChoice[{True,False},10^6];
AbsoluteTiming[l2=Developer`ToPackedArray@With[{True=1,False=0},Evaluate@list];]
(*{0.066533,Null}*)
Compare that to Boole.
AbsoluteTiming[l3=Boole[list];]
l2===l3
(*{0.262770,Null}*)
(* True *)
It seems we can make a faster Boole. I tried to use the code above to do that, but it doesn't work.
boole[list_]:=Developer`ToPackedArray@With[{True=1,False=0},Evaluate@list];
list={True,True,False,True,False};
boole[list]
(*{True,True,False,True,False}*)
Why doesn't boole above work, and how can it be fixed?