Faster egen (that resorts datasets)