EgorBo / EgorBo/SimdJsonSharp

Native Bindings is x10 Slower

Open
#13 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
687
Forks
48
PR merge metrics
No merged PRs in 30d

Description

I have tried to add SimdJsonSharp to my serializer perfomrance test suite. See https://github.com/Alois-xx/SerializerTests

When you compile it and let it run on .NET Core Preview 7

```
D:\Source\git\SerializerTests\bin\Debug\netcoreapp3.0>SerializerTests.exe -test combined -serializer Utf8JsonSerializer,SimdJsonSharpSerializer,SimdJsonSharpSerializerN

Serializer Objects "Time to serialize in s" "Time to deserialize in s" "Size in bytes" FileVersion Framework ProjectHome DataFormat FormatDetails Supports Versioning
SimdJsonSharpSerializer 1000000 0.1310 0.116 35777803 1.5.0.0 .NET Core 3.0.0-preview7-27912-14 https://github.com/EgorBo/SimdJsonSharp based on https://github.com/lemire/simdjson Text Json No
SimdJsonSharpSerializerN 1000000 0.1117 3.139 35777803 1.7.0.0 .NET Core 3.0.0-preview7-27912-14 https://github.com/EgorBo/SimdJsonSharp based on https://github.com/lemire/simdjson Text Json No
Utf8JsonSerializer 1000000 0.1135 0.330 35777803 1.3.7 .NET Core 3.0.0-preview7-27912-14 https://github.com/neuecc/Utf8Json Text Json Yes
```

I find the native version needs 3s vs 0.1s for the managed version.
![grafik](https://user-images.githubusercontent.com/408821/62008088-7680cd80-b155-11e9-8e7f-6dbbf52078d4.png)

When lookint at the data in PerfView I find most time is spent in paserJson. Why this is so costly I cannot tell but it looks wasteful. Can you take a look why this is so much slower? Am I using the library the wrong way?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.