I tried similar thing using java. It is taking 86 ms for parsing.
This is most probably due to the startup of the JVM. I would be surprised if you shouldn't get similar times as shown on command line (btw, you'll get more exact measurements by using System.nanoTime()).
We have a scenario where we need to execute queries thousand times for each user, that will hamper the performance.
I'll be interested to find out how much of the total time of your application will be spent for parsing the query, or if it's not other components that will be predominating. Feel free to send me some profiling data (e.g. generated via the JVM flags -Xrunhprof:cpu=samples) once you have it running.