optimization in kernel compile