I'm currently working on a java selenium Project, which is usually a small script where I have to check for each element for it's presence and based on that some actions are triggered but our main concern is time duration to finish the script.
Basically I have used each one from below in my script and ran the test, though in each case script was running but I find very little speed improvement in script execution duration.I'm using wait
driver.manage().timeouts().implicitlyWait(10000,TimeUnit.MILLISECONDS);
and along with it
!(driver.findElement(By.xpath("Element Xpath)).isEmpty())
or
driver.findElements(By.xpath("Element Xpath)).size()>0
I know I can go for CSS Selectors but in my case that is not feasible due to DOM Tree structure. what can be used instead of
driver.findElements(By.xpath("Element Xpath)).size()>0
this to check if element is present or not and based on that I have to trigger multiple other actions.

Thread.sleep()is not the way to speed up anything and is, in general, a bad practice..implicitlyWait()call. That's a one-time setting for the driver so putting that in a loop doesn't accomplish anything. Also, increasing the counter each time you loop makes no sense either. Just useWebDriverWaitand wait one time for the maximum period of time you want to wait. If it is found early, it exits the wait. If it's never found, it times out.