ant icon indicating copy to clipboard operation
ant copied to clipboard

Use char notation to represent a character to improve performance.

Open reudismam opened this issue 7 years ago • 8 comments

reudismam avatar Feb 16 '18 13:02 reudismam

Can one of the admins verify this patch?

asfgit avatar Feb 16 '18 13:02 asfgit

Can one of the admins verify this patch?

asfgit avatar Feb 16 '18 13:02 asfgit

this is ok to test

jaikiran avatar Feb 16 '18 13:02 jaikiran

Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/Ant%20Github-PR-Windows/43/

asfgit avatar Feb 16 '18 13:02 asfgit

Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/Ant%20Github-PR-Linux/37/

asfgit avatar Feb 16 '18 13:02 asfgit

Hi @reudismam, Is there some reference documentation which states that this construct performs better? My brief check of the JLS just showed a note which states that some implementations might perform better with this construct, but other than that I haven't found anything, so just curious.

jaikiran avatar Feb 16 '18 13:02 jaikiran

Actually, I do not have a documentation, but there are discussions in programming community about the benefits of this change, such as this:

https://stackoverflow.com/questions/24859500/concatenate-char-literal-x-vs-single-char-string-literal-x

This edit is known to have improved performance on other projects such as Guava Project where they improve performance from 10-25%.

https://github.com/google/guava/commit/8f48177132547cee2943c93837d76b898154d722

reudismam avatar Feb 16 '18 15:02 reudismam

These changes might improve performance, but do you have a testsuite with validates that? Most of the changes are done on places which are rarely invoked in a build (without having tested that ;-)

janmaterne avatar Feb 16 '18 17:02 janmaterne