tomba / netserializer

Fast(est?) .Net Serializer
Other
271 stars 59 forks source link

Test improvements #23

Closed leo-gan closed 9 years ago

leo-gan commented 9 years ago

Hey, I've created a benchmark for serializers: http://geekswithblogs.net/LeonidGaneline/archive/2015/05/06/serializers-in-.net.-v.2.aspx

I'm not an expert in your serializer, so the tests are not so good as they have to be for your serializer. It would be great if you look to the test code https://github.com/leo-gan/GLD.SerializerBenchmark and maybe optimize it for the better performance. Thank you for your great serializer! Leo

tomba commented 9 years ago

There's nothing to customize or optimize with a simple setup like in your benchmark. Is there something specific in NetSerializer's performance that you think should be improved?

However, the conversion to string and back to byte[] sounds like something that will skew the results quite badly... Then again, I have no numbers so maybe the effect is negligible.

leo-gan commented 9 years ago

Hi Tomi,

Thank you for answer. Yes, I'm doing changes now to use stream, because it must be stream. My first approach was with strings, but in was completely unprofessional. I've traded up the clear performance for "simplicity".

Regards,

Leonid Ganeline Microsoft Integration MVP (BizTalk Server) http://geekswithblogs.net/leonidganeline/

On Thu, Jun 18, 2015 at 9:24 AM, Tomi Valkeinen notifications@github.com wrote:

There's nothing to customize or optimize with a simple setup like in your benchmark. Is there something specific in NetSerializer's performance that you think should be improved?

However, the conversion to string and back to byte[] sounds like something that will skew the results quite badly... Then again, I have no numbers so maybe the effect is negligible.

— Reply to this email directly or view it on GitHub https://github.com/tomba/netserializer/issues/23#issuecomment-113208454.

tomba commented 9 years ago

Ok, sounds good.

As a side note, when doing benchmarking I've always been interested in the amount of GCs happening (as can be seen from my perf tests in NetSerializer's README). I think it gives a nice idea of the memory pressure the code is creating. Obviously GCs also affect the amount of time the code takes to run, so it's kind of included in the total run time, but it's still an interesting data point.

So just an idea if you're wondering what to add to your benchmark =).

leo-gan commented 9 years ago

Thank you for suggestion. I will try to figure out how to measure it.

Regards,

Leonid Ganeline Microsoft Integration MVP (BizTalk Server) http://geekswithblogs.net/leonidganeline/

On Thu, Jun 18, 2015 at 11:50 AM, Tomi Valkeinen notifications@github.com wrote:

Ok, sounds good.

As a side note, when doing benchmarking I've always been interested in the amount of GCs happening (as can be seen from my perf tests in NetSerializer's README). I think it gives a nice idea of the memory pressure the code is creating. Obviously GCs also affect the amount of time the code takes to run, so it's kind of included in the total run time, but it's still an interesting data point.

So just an idea if you're wondering what to add to your benchmark =).

— Reply to this email directly or view it on GitHub https://github.com/tomba/netserializer/issues/23#issuecomment-113255719.