I am leaning n-gram, and building a dictionary to save n-gram values. I have something like this:
{
  "it is" : 0.01,
  "this is" : 0.005,
  "hello i" : 0.2
  "hello you" : 0.3
  ...
}
My dictionary has about 3million keys and it takes 0.0002(s) to get a bigramvalue. 
Is there anything faster than dict that I could use?