or run

npx @tessl/cli init
Log in

Version

Files

tile.json

rubric.jsonevals/scenario-8/

{
  "context": "This criteria evaluates how well the engineer uses pixelmatch's performance-optimized memory access features, specifically focusing on efficient buffer handling, avoiding intermediate allocations, and leveraging typed array views for fast comparison operations.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uint32Array usage",
      "description": "Uses Uint32Array views created from the input buffers to enable 4-byte-at-once comparison instead of byte-by-byte comparison. Should check if buffers are equal by comparing 32-bit integers (4 RGBA bytes as one unit).",
      "max_score": 30
    },
    {
      "name": "ByteOffset handling",
      "description": "Correctly accesses the buffer property and byteOffset property of typed array views when creating Uint32Array views, ensuring sliced or offset buffers are handled properly.",
      "max_score": 20
    },
    {
      "name": "No intermediate allocations",
      "description": "Implements comparison without creating any temporary buffers or arrays during the comparison loop. All operations work directly on the provided input and output buffers.",
      "max_score": 20
    },
    {
      "name": "Fast-path optimization",
      "description": "Implements an early-exit optimization that quickly returns 0 when images are identical, using the Uint32Array comparison for speed.",
      "max_score": 15
    },
    {
      "name": "Efficient grayscale",
      "description": "Calculates grayscale values efficiently in a single pass without intermediate storage, combining luminance calculation (0.299*R + 0.587*G + 0.114*B) with alpha blending directly during pixel iteration.",
      "max_score": 15
    }
  ]
}