Skip to content

Instantly share code, notes, and snippets.

View rogeralsing's full-sized avatar
😈
Feeling Awesome

Roger Johansson rogeralsing

😈
Feeling Awesome
View GitHub Profile
string method (self,stream,session)
{
newobj ctor //create POCO stack 1
stloc_0 //store var0 (object) stack 0
ldloc_0 //load var0 stack 1
castclass poco //cast to POCO stack 1
ldarg_0 //load this stack 2
ldfld stringserializer //load stringserializer stack 2

Test LargeStructTest

Running cold

Wire - KnownTypes + Reuse Sessions
   Serialize                      297 ms
   Deserialize                    162 ms
   Size                           35 bytes
   Total                          459 ms
using System;
using System.Diagnostics;
using System.IO;
namespace ConsoleApplication18
{
class Program
{
static void Main(string[] args)
{
private void SerializeZeroFormatter()
{
try
{
var s = new MemoryStream();
ZeroFormatterSerializer.Serialize(s, Value);
var bytes = s.ToArray();
RunTest("Zero Formatter", () =>
{
var stream = new MemoryStream();
ZeroFormatter
Serialize 620 ms
Deserialize 131 ms
Size 65 bytes
Total 751 ms
ZeroFormatterWithPooling
Serialize 519 ms
Deserialize 162 ms
Size 65 bytes
Total 681 ms
using System;
using System.Diagnostics;
using Akka.Actor;
namespace SpawnTest
{
internal class Request
{
public long Div;
public long Num;
At Asynkron, we manage a lot of open source projects and we’re required to have agreements with everyone who takes part in them.
It’s the easiest way for you to give us permission to use your contributions.
In effect, you’re giving us a licence, but you still own the copyright — so you retain the right to modify your code and use it in other projects.
protoc -I=. -I=%GOPATH%\src\github.com\gogo\protobuf\protobuf -I=%GOPATH%\src --gogoslick_out=Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,plugins=grpc:. protos.proto
REM do not that %GOPATH%\src\github.com\gogo\protobuf\protobuf is mapped as a root path

My experiences with writing high performance .NET vs Go code.

Generally, writing fast Go code is easier. This comes down to two reasons:

The Go scheduler will yield on sys and function calls. You simply write "normal" sequential code and it will perform really well under high concurrent load.

In .NET, we have the TPL and async await. .NET is capable of high performance concurrent code, using Tasks works well for this.

-module(pingpong).
-author("ROJO01").
-export([run/0, ping/2, pong/0]).
ping(Num, ReplyTo) ->
receive
{msg, Pong} ->
case Num of
0 -> ReplyTo ! done;
N when N rem 100 == 0 ->