Some faults,

it is late -.-

Pre:

(x + z) * y

After:

x + y * z

As for comments ... do not add comments to the commit message only, add 
some comments to the source code too.

It is annoying to refactor such code ... at least somebody may reply, 
posting a link to a former commit message, rejecting your
changes for that reason because he / she read the commit history but you 
do not.

BR,

Stefan


Am 26.06.2012 00:24, schrieb Stefan Rossbach:
> Hi Folks,
>
> Just noticed this by myself.
>
> Please always add comments, when you optimize code that results in much
> more complicate code, but should not
> be refactored because of an optimization.
>
> I forgot this when I worked on
> http://sourceforge.net/tracker/?func=detail&aid=3515619&group_id=167540&atid=843359
>
> Pre:
>
> Let x be the directory length (in characters / byte (depends on
> encoding)). Let y the number files in this directory and let
> z be the average length of a filename (in characters / byte (depends on
> encoding)).
>
> Transmitted bytes ...
>
> Pre optimization:
>
> Bytes for all filenames in a directory: x * y * z
>
> After optimization:
>
> Bytes for all filenames in a directory: x  + (y * z)
>
> Regards,
> Stefan
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Dpp-devel mailing list
> Dpp-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dpp-devel



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Dpp-devel mailing list
Dpp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dpp-devel

Reply via email to