I would love to find out the answer to this. Even if you don't know the 
answer but know how to investigate into it (using pprof or some tracing 
flags), I would also appreciate being guided in the right direction and I 
would love to embark on the journey of finding out myself.

What I'm basically saying is that I'd be more interested to find out the 
way in which I can tell why one is faster than the other, as opposed to 
hearing just the final answer. Hope that makes sense.

On Thursday, 5 October 2017 15:22:47 UTC+2, Marvin Stenger wrote:
>
> I can reproduce the numbers. The only think I'm seeing is that the spans 
> array is allocated on the stack. Not sure though if this is the only reason.
>
> Am Donnerstag, 5. Oktober 2017 13:13:56 UTC+2 schrieb Gabriel Aszalos:
>>
>> I was playing around with the implementation of FieldsFunc from the bytes 
>> package and I was wondering how it would affect the benchmarks to disregard 
>> the extra slice that was used there to calculate offsets. It only made 
>> sense that it would make things faster.
>>
>> To my amusement (although expected), it didn't. But I'm quite curious why 
>> one is faster than the other and if this reveals any good practices when 
>> working with similar algorithms. The benchmark and diff I am talking about 
>> can be viewed here:
>>
>>
>> https://github.com/gbbr/go/commit/2f6e92bc746fa232f2f2aea66dae3fa0c04700a5?diff=split
>>
>> Many thanks for looking!
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to