Skip to content

Instantly share code, notes, and snippets.

@hkwi
Last active August 29, 2015 13:57
Show Gist options
  • Save hkwi/9540726 to your computer and use it in GitHub Desktop.
Save hkwi/9540726 to your computer and use it in GitHub Desktop.

trema-edge 改修ポイント

  • timer を秒刻み(あるいは 0.5 秒)で一つ動かす。
  • match を大きな構造体にまとめる。
    • mask するものと完全一致のものを分離する ワイルドカード指定もマスクで処理してしまいたいので、全てvalue/maskで
    • union にして int32_t で比較やマスク操作する
    • 内部表現とプロトコル表現を分けて持つ
  • コンテナクラスを最適なものに置き換える
    • 末尾挿入の速度
    • メモリ使用率
    • スキャン速度
  • mutex を限定する
  • thread 間通信に queue を使う
  • goto, output のない flow rule を弾いてもいい?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment