Minor performance improvements in 'Sample.KDE' and 'Sample.histogram'