some performance enhancements in crammer-singer model