scala performance