Maybe it's caused by inlining behaviour differences? Why aren't you
using bs = rv.Bytes() ?
Rémy.
- Can you give more details about what is being benchmarked?
- Did you try profiling?
- Can you count allocations to see if there is a difference?
- Did you report your problems with gccgo?
Rémy.
On Sun, Apr 15, 2012 at 13:13, Ugorji Nwoke <ugo...@gmail.com> wrote:
> I'm seeing weird things in my code which I'm benchmarking.
(...)
> rvi := rv.Interface()
> bs = rvi.([]byte)
> TO
> bs = rv.Interface().([]byte)
If you put more or less data onto the stack, you'll affect the precise
point in which the stack is split, which will touch performance up or
down. This is specially true for recursive functions (generally the
case with marshalers) as such a single line change will in fact
accumulate.
> I was hoping that gccgo would give more stable results but it actually
> increased run times across the board significantly, and had issues decoding
> BSON where it decoded fine when run under gc.
Can you please provide a small example that breaks gccgo?
--
Gustavo Niemeyer
http://niemeyer.net
http://niemeyer.net/plus
http://niemeyer.net/twitter
http://niemeyer.net/blog
-- I'm not absolutely sure of anything.
I think Russ mentioned Ian was in holidays this weeks, and I support
the practice of always writing for everyone and not individual people.
Even if other people might not help, everybody could be interested
about knowing in detail the current issues. It's always a good thing
knowing in advance of possible problems.
Rémy.
Hi Ugorji,