{
  "schema_version": 2,
  "diagram_type": "workflow",
  "meta": {
    "title": "libgav1: thay 32K dòng SIMD bằng Rust an toàn",
    "quality_profile": "showcase",
    "legend": {
      "mode": "hidden"
    },
    "views": [
      {
        "id": "loop",
        "label": "Vòng thử",
        "focus": [
          "exp",
          "asm",
          "rewrite"
        ],
        "note": "Agent Argon chạy nhiều vòng thử có đo hiệu năng, đọc output của compiler, viết Rust an toàn để compiler tự vectorize."
      },
      {
        "id": "result",
        "label": "Kết quả",
        "focus": [
          "port",
          "result"
        ],
        "note": "Bộ giải mã an toàn bộ nhớ, nhanh hơn bản port Rust 2.7 lần, video ra giống hệt (theo Google)."
      }
    ]
  },
  "lanes": [
    {
      "id": "in",
      "label": "Đầu vào và kết quả"
    },
    {
      "id": "agent",
      "label": "Agent Argon"
    }
  ],
  "phases": [
    {
      "id": "p1",
      "label": "Có sẵn",
      "fromCol": 0,
      "toCol": 0
    },
    {
      "id": "p2",
      "label": "Lặp nhiều vòng",
      "fromCol": 1,
      "toCol": 3,
      "variant": "emphasis"
    },
    {
      "id": "p3",
      "label": "Kết quả",
      "fromCol": 4,
      "toCol": 4,
      "variant": "dashed"
    }
  ],
  "mainPath": [
    "port",
    "exp",
    "asm",
    "rewrite",
    "result"
  ],
  "nodes": [
    {
      "id": "port",
      "lane": "in",
      "col": 0,
      "type": "database",
      "label": "Bản port Rust",
      "sublabel": "còn 32K dòng SIMD",
      "width": 160
    },
    {
      "id": "exp",
      "lane": "agent",
      "col": 1,
      "type": "backend",
      "label": "Thử có đo",
      "sublabel": "profile-guided",
      "width": 150
    },
    {
      "id": "asm",
      "lane": "agent",
      "col": 2,
      "type": "backend",
      "label": "Đọc output compiler",
      "sublabel": "xem có vectorize",
      "width": 180
    },
    {
      "id": "rewrite",
      "lane": "agent",
      "col": 3,
      "type": "backend",
      "label": "Viết Rust an toàn",
      "sublabel": "compiler tự vectorize",
      "width": 180
    },
    {
      "id": "result",
      "lane": "in",
      "col": 4,
      "type": "frontend",
      "label": "Nhanh hơn 2.7 lần",
      "sublabel": "video ra giống hệt",
      "width": 170
    }
  ],
  "edges": [
    {
      "id": "e1",
      "from": "port",
      "to": "exp",
      "variant": "emphasis"
    },
    {
      "id": "e2",
      "from": "exp",
      "to": "asm",
      "variant": "emphasis"
    },
    {
      "id": "e3",
      "from": "asm",
      "to": "rewrite",
      "variant": "emphasis"
    },
    {
      "id": "e4",
      "from": "rewrite",
      "to": "result",
      "variant": "emphasis"
    }
  ]
}