My English must be failing me, but I've stressed quite a few times both 
possibilities (way slower vs. acceptably slower), and how far current 
changes are from a testable state. Merging is a very distant possibility.

Regarding dependency injection, I take you mean dynamically replacing 
the Logger, and associated classes? That wouldn't be a representative of 
the final benchmark since there's no lazy evaluation.

On 04-04-2012 16:31, Florent Daigniere wrote:
> 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
> _______________________________________________
> Devl mailing list
> Devl at freenetproject.org
> https://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl

Reply via email to