If the same performance gain can be can be achieved with TN's suggestion, lets go with that. It sure sounds simpler. I can appreciate that you've put effort into this but that should not be the driver for acceptance. Can we try that first? We've also worked hard to have common code for B32 and 64, it would be a shame to loose that.
Gary On Feb 18, 2013, at 17:08, Julius Davies <juliusdav...@gmail.com> wrote: > On Mon, Feb 18, 2013 at 12:25 PM, Thomas Neidhart > <thomas.neidh...@gmail.com> wrote: >> On 02/18/2013 08:14 PM, jul...@apache.org wrote: >>> Author: julius >>> Date: Mon Feb 18 19:14:31 2013 >>> New Revision: 1447443 >>> >>> URL: http://svn.apache.org/r1447443 >>> Log: >>> CODEC-166 - Base64 could be faster. >>> >>> Added: >>> >>> commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/ApacheModifiedMiGBase64.java >>> >>> commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/MiGBase64.original >>> Modified: >>> commons/proper/codec/trunk/src/changes/changes.xml >>> >>> commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/Base64.java >> >> I played around with your benchmark, and the main reason Commons Codec >> is so slow compared to the other ones is because CC initializes by >> default an internal buffer with a fixed size of 8192. >> >> Adjusting the BaseNCodec.encode(byte[]) / decode(byte[]) methods to >> pre-initialize the internal buffer to a better estimate (array.length * >> 4 / 3 in the encode case, and array.length * 3 / 4 in the decode case) >> results in very similar figures compared to MiGBase and iHarder. >> >> So I would be in favor of reverting this change and improve the existing >> Base64 implementation, I can provide a patch for this. >> >> Thomas > > Any specific reasons you don't like the patch? Here's some I can think of: > > 1.) We now have a fair amount of duplicate logic. > > 2.) It contains some BSD-licensed code (using 2-clause BSD license). > I think this license is compatible with Apache Software License 2.0 > (in other words, a file containing both license headers can still be > licensed to others under the terms of the ASL 2.0 without any > problems), but RAT report doesn't like the way I've put > "MiGBase64.original" in the source tree. RAT report appears okay > with the way I did license header for ApacheModifiedMiGBase64.java. > > 3.) The code is not specifically licensed to the Apache Software > Foundation through a CLI. Instead we're forking an existing open > source project that uses an Apache-compatible license (as best I > understand things). > > 4.) Individual authorship information remains present, which is > generally not the way we do things, but I left it in (including the > moniker "MiG"), since I think that's the best way to pay respect to > the original project we're forking. > > > Obviously I'd like to see this patch get through after all the work > I've put in for it. If any of the issues I've mentioned above are > blocking, let's explore possible resolutions. > > Are there any other problems you spotted? > > > > > > > yours, > > Julius > > > > >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org >> For additional commands, e-mail: dev-h...@commons.apache.org > > > > -- > yours, > > Julius Davies > 604-222-3310 (Home) > > $ sudo apt-get install cowsay > $ echo "Moo." | cowsay | cowsay -n | cowsay -n > http://juliusdavies.ca/cowsay/ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org > For additional commands, e-mail: dev-h...@commons.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org