On Saturday 19 July 2008 10:04, nextgens at freenetproject.org 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
> cvs at freenetproject.org
> http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL:
<https://emu.freenetproject.org/pipermail/devl/attachments/20080801/d8b960e4/attachment.pgp>