Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutContactPrivacyTerms
Skip to lesson

Course contents

  • Getting Started with AI for VLSI Engineers5
  • Just Enough AI: Models and Context15
  • Prompting13
  • Trust and Verification14
  • Using AI for Engineering Work17
  • Engineering Walkthroughs7
  • Practical Foundations for AI Workflows4
  • Engineering Data5
  • Retrieval-Augmented Generation6
  • Agents and Tool Use18
  • Agent Design8
  • MCP and Skills6
  • Multi-Agent Design6
  • Practical Capstone6
  • Tokens, Cost and Latency12
    • Cost Arithmetic
      • The Cost Formula
      • A Code-Review Job
      • A Nightly Regression Summary
      • Sensitivity and a Cost Calculator
    • Latency and Throughput
    • Reducing Tokens
  • Agentic Workflows for Chip Teams18
  • Interview and Judgment10
  • AI Skills: Full Course Index
  • Working with AI Glossary
  • Working with AI Cheatsheet
Loading lesson

‹Cost Arithmetic
  1. Topics
  2. AI Skills for VLSI Engineers
  3. Tokens, Cost and Latency
  4. Cost Arithmetic
  5. A Code-Review Job

Reference: Tokens, Cost and Latency · Beginner to Intermediate

A Code-Review Job

A worked code-review job cost from tokens per review to daily totals.

On this page

    A review as tokens

    One review sends the diff plus short instructions and policy notes. It returns review comments, so output stays a fraction of input.

    Redact secrets before sending code to a hosted service. Send only the files the review needs.

    Diff size

    Input tokens

    Output tokens

    Cost (units)

    Small

    4000

    400

    0.0168

    Typical

    12000

    800

    0.0456

    Large

    25000

    1500

    0.093

    Cost per review

    The typical review carries 12000 input tokens and 800 output tokens. Substitution gives 0.0456 units at the EXAMPLE prices.

    plaintext
    1
    2
    3
    4
    5
    EXAMPLE prices (not real prices): 3 units per 1M input tokens, 12 units per 1M output tokens
    typical review: 12000 input tokens, 800 output tokens
    input part  = 12000 / 1000000 x 3 = 0.036 units
    output part = 800 / 1000000 x 12 = 0.0096 units
    per review  = 0.036 + 0.0096 = 0.0456 units

    Daily totals

    Forty typical reviews a day cost 40 times one review. That product is the daily budget line.

    plaintext
    40 reviews a day at 0.0456 units each
    daily total = 40 x 0.0456 = 1.824 units per day

    Common pitfall

    Averages hide the tail. A few huge diffs can carry most of the tokens, so budget from the size mix, not from one typical review.

    Interview

    Likely probes: per-unit derivation and scaling to a team.

    • Per-review cost is 0.0456 units from 12000 in and 800 out at the EXAMPLE prices.

    • Daily cost scales linearly with review count at fixed mix: 40 reviews give 1.824 units.

    • Large diffs dominate the budget, so caps on context per review control cost.

    Check yourself A small review uses 4000 input and 400 output tokens. What is its cost at the EXAMPLE prices?

    Input gives 0.012 units and output gives 0.0048 units. The total is 0.0168 units.

    Check yourself Forty typical reviews cost 1.824 units a day. What changes if the team runs 20 reviews instead?

    The daily total halves to 0.912 units. Cost is linear in review count at a fixed mix.

    Related topics

    • A nightly regression summary

    • Tokens and tokenization

    Previous

    132 / 173

    Next: A Nightly Regression Summary

    Up next

    Up nextA Nightly Regression Summary

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Sensitivity and a Cost Calculator