Fwd: Request for review: 8017611: Auto corrector for mistyped vm options
Dmitry Samersoff
dmitry.samersoff at oracle.com
Wed Jun 26 06:48:29 PDT 2013
Bengt,
Thank you for clarifying things. Now it much more understandable.
Few comments to webrev:
1.
Typically Levenshtein distance[1] is used to implement futures like this
one, but it might be an overkill here.
2.
351 if (!strncmp(bigram1, bigram2, 2)) {
we can save a bit of cpu cycles writing it as
*(short *)bigram1 == *(short *)bigram2
3.
We probably don't need doubles here.
[1] http://en.wikipedia.org/wiki/Levenshtein_distance
-Dmitry
On 2013-06-26 17:08, Bengt Rutisson wrote:
>
>
>
> -------- Original Message --------
> Subject: Request for review: 8017611: Auto corrector for mistyped vm
> options
> Date: Tue, 25 Jun 2013 10:44:50 -0700
> From: Tao Mao <tao.mao at oracle.com>
> Organization: Oracle Corporation
> To: hotspot-gc-dev at openjdk.java.net <hotspot-gc-dev at openjdk.java.net>
>
>
>
> I'm kinda tired of mistyping VM options and figuring it out
> "mentally"...let machines do it then.
>
> changeset:
> Currently, when we mistype VM options you will get the warning as following
>
> $java -XX:+UseParalelGC -version
> Unrecognized VM option 'UseParalelGC'
>
> I think we can do one step further to interpret the user's intent and
> suggest the correct VM options. Then i start to imagine that we have
> something like this
>
> $java -XX:+UseParalelGC -version
> Unrecognized VM option 'UseParalelGC'
> Did you mean 'UseParallelGC'?
>
> Please refer to the wikipedia
> http://en.wikipedia.org/wiki/S%C3%B8rensen%E2%80%93Dice_coefficient to
> get an idea of obtaining string similarity. This new feature is based on
> this theory.
>
> webrev:
> http://cr.openjdk.java.net/~tamao/8017611/webrev.00/
>
> Please try out this patch and see if it meets some need.
>
> Thanks.
> Tao
>
>
>
--
Dmitry Samersoff
Oracle Java development team, Saint Petersburg, Russia
* I would love to change the world, but they won't give me the sources.
More information about the hotspot-dev
mailing list