On Wed, Apr 04, 2012 at 12:58:55PM -0300, Marco Schulze wrote:
> On 04-04-2012 11:43, Zlatin Balevsky wrote:
>>
>> The problem of abusing the predicate by performing anything other than  
>> logging inside it.
>>
> I guess that that does improve readability a bit. However, less than 5%  
> of the ifs guards anything but Log.*() calls.
>
>> You cannot get rid of the predicate without introducing side effects  
>> as I've demonstrated throughout this thread.
>>
> By removing the predicate and delegating checks to the logging function,  
> a _lot_ of boilerplate code is removed. Ideally, as toad said, Java  
> would have some kind macro system enabling the best of both worlds.  
> Lacking that, the question becomes: 'is the overhead acceptable?'.
>
> There have been quite a lot of arguments thrown here. In the end,  
> though, as fred is big and complex, the only answer is to write some  
> code and actually run the thing. Are varargs bad? Sure. Is the slowdown  
> unacceptable? No idea. Just bear with my slowness (or do help), and  
> you'll at least have a convincing argument for the next fool in the line.
>

You're the one who should try to convince us to merge your jumbo patch...

If your proposed solution is not faster than the existing code, you'd
 better come up with a solid and representative benchmark showing that
 the difference is not significant. If your 'solution' is trading 'jar
 size' and 'readability' against run-time performance (for the common
 case assuming logNORMAL), we won't merge it. Freenet is slow enough
 as is.

Hint: your doing it wrong, the one way to make it faster and nicer is to
 use dependancy injection

Florent

Reply via email to