It makes sense, however, it affect code clarity. I would only use it in
the critical path.
Mohamed
charlie hunt wrote:
> Don't know ... never tried that approach nor do I know if there are
> any performance advantages of that approach either?
>
> charlie ....
>
> Oleksiy Stashok wrote:
>> Hello,
>>
>> what about
>> response.append('"').append(value).append('"'); // double quote
>> inside single quotes
>>
>> does it make any sense?
>>
>> Alexey.
>>
>> charlie hunt wrote:
>>> Don't know if anyone else noticed hamada's commit ?
>>>
>>> There's a nice enhancement that's done in that commit which makes
>>> better use of StringBufffer.append().
>>>
>>> For example,
>>> response.append("\"").append(value).append("\"");
>>> will perform much better than,
>>> response.append("\"" + value + "\"");
>>>
>>> With some of the enhancements in compilers and run time JIT
>>> compilers this kind of transformation may get done automatically.
>>> However, IMO, the explicit change made by hamada is a better approach.
>>>
>>> Nice job Hamada.
>>>
>>> Btw, I'm gonna ask Tom Ball who is the creator of Jackpot if a
>>> Jackpot transformation rule could easily be created to identify such
>>> a usage and also provide the transformation. That'd be a nice
>>> transformation to have.
>>>
>>> charlie ...
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_grizzly.dev.java.net
>>> For additional commands, e-mail: dev-help_at_grizzly.dev.java.net
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_grizzly.dev.java.net
>> For additional commands, e-mail: dev-help_at_grizzly.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: dev-help_at_grizzly.dev.java.net
>