fixes #112 performance problem with sorting empty arrays