Optimize ReducePercentile method: do not call len() twice + move sorting after index check
Optimize ReducePercentile method: do not call len() twice + move sorting after index check

chenziliang/influxdb,arussellsaw/influxdb,jipperinbham/influxdb,mvadu/influxdb,mvadu/influxdb,jipperinbham/influxdb,jgeiger/influxdb,influxdb/influxdb,joaopedrotaveira/influxdb,mvadu/influxdb,linearb/influxdb,arussellsaw/influxdb,influxdb/influxdb,otoolep/influxdb,linearb/influxdb,apigee/influxdb,pkittenis/influxdb,vladlopes/influxdb,influxdb/influxdb,jgeiger/influxdb,runner-mei/influxdb,mvadu/influxdb,mnuessler/influxdb,daachi/influxdb,daachi/influxdb,jipperinbham/influxdb,mvadu/influxdb,arussellsaw/influxdb,arussellsaw/influxdb,benbjohnson/influxdb,linearb/influxdb,influxdata/influxdb,influxdb/influxdb,otoolep/influxdb,influxdata/influxdb,jonseymour/influxdb,benbjohnson/influxdb,vladlopes/influxdb,pkittenis/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,apigee/influxdb,mnuessler/influxdb,benbjohnson/influxdb,chenziliang/influxdb,jgeiger/influxdb,li-ang/influxdb,li-ang/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,otoolep/influxdb,mvadu/influxdb,pkittenis/influxdb,jipperinbham/influxdb,otoolep/influxdb,archsaber/influxdb,archsaber/influxdb,arussellsaw/influxdb,jonseymour/influxdb,otoolep/influxdb,linearb/influxdb,mark-rushakoff/influxdb,daachi/influxdb,nooproblem/influxdb,nooproblem/influxdb,pkittenis/influxdb,benbjohnson/influxdb,joaopedrotaveira/influxdb,mark-rushakoff/influxdb,runner-mei/influxdb,runner-mei/influxdb,runner-mei/influxdb,jonseymour/influxdb,pkittenis/influxdb,vladlopes/influxdb,mnuessler/influxdb,chenziliang/influxdb,otoolep/influxdb,mnuessler/influxdb,joaopedrotaveira/influxdb,mnuessler/influxdb,jipperinbham/influxdb,jonseymour/influxdb,archsaber/influxdb,apigee/influxdb,mnuessler/influxdb,arussellsaw/influxdb,chenziliang/influxdb,archsaber/influxdb,daachi/influxdb,jonseymour/influxdb,nooproblem/influxdb,nooproblem/influxdb,vladlopes/influxdb,joaopedrotaveira/influxdb,daachi/influxdb,pkittenis/influxdb,apigee/influxdb,mark-rushakoff/influxdb,daachi/influxdb,jonseymour/influxdb,jgeiger/influxdb,jgeiger/influxdb,apigee/influxdb,apigee/influxdb,joaopedrotaveira/influxdb,jipperinbham/influxdb,linearb/influxdb,mark-rushakoff/influxdb,jgeiger/influxdb,nooproblem/influxdb