タグ

2016年8月2日のブックマーク (2件)

  • MessagePack: It's like JSON. but fast and small.

    It's like JSON. but fast and small. MessagePack is an efficient binary serialization format. It lets you exchange data among multiple languages like JSON. But it's faster and smaller. Small integers are encoded into a single byte, and typical short strings require only one extra byte in addition to the strings themselves. Next: MessagePack is supported by over 50 programming languages and environm

  • GoのパフォーマンスTipsメモ

    パフォーマンス維持のコツをコツコツとメモする リフレクションは最後の手段 パフォーマンスに寄与しない部分でのみ使う。 どこがパフォーマンスに寄与するのかが不透明なうちは使用禁止のほうが良い。 一度使い出すとリフレクションは多用したくなる魔力がある。 メモリ使用量 値は8バイトアライメントに置かれるので基は8バイト長分メモリを専有。 ポインタ変数は64bitCPUで8バイト長 インターフェース型変数は16バイト長〜 (値+型識別) メモリ確保を含む型コンバートは 型キャスト、アサーションに比べると10倍以上遅い。 同じ値なのに「メモリ確保を含む型コンバート」を複数回行う場合は メモリ消費量は増えるが汎用の変数「interface{}」に 値を保存しておいて参照するほうが速度を維持できる。 ゼロメモリアロケーション 高頻度操作におけるメモリアロック1とゼロの間には大きな速度差がある。 可能で

    TAKEmaru
    TAKEmaru 2016/08/02