Use sparse computation where possible