On Saturday 19 July 2008 10:04, [EMAIL PROTECTED] wrote: > Author: nextgens > Date: 2008-07-19 09:04:21 +0000 (Sat, 19 Jul 2008) > New Revision: 21232 > > Modified: > trunk/freenet/src/freenet/support/SimpleFieldSet.java > Log: > minor optimisation to SimpleFieldSet
AFAICS this isn't an optimisation, it's just a tidy-up (with identical
performance). We still have gratuitous String's being created.
>
> Modified: trunk/freenet/src/freenet/support/SimpleFieldSet.java
> ===================================================================
> --- trunk/freenet/src/freenet/support/SimpleFieldSet.java 2008-07-19
08:56:46 UTC (rev 21231)
> +++ trunk/freenet/src/freenet/support/SimpleFieldSet.java 2008-07-19
09:04:21 UTC (rev 21232)
> @@ -840,10 +840,9 @@
> }
>
> public void put(String key, int[] value) {
> - // FIXME this could be more efficient...
> removeValue(key);
> - for(int i=0;i<value.length;i++)
> - putAppend(key, Integer.toString(value[i]));
> + for(int v : value)
> + putAppend(key, v);
> }
>
> public void put(String key, double[] value) {
>
> _______________________________________________
> cvs mailing list
> [EMAIL PROTECTED]
> http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs
>
>
pgpJxCqMoPbRa.pgp
Description: PGP signature
_______________________________________________ Devl mailing list [email protected] http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
