Skip to content

Remove ProgramTimings tracking to eliminate unnecessary 200µs/block overhead #6110

@tao-stones

Description

@tao-stones

Problem

The per_program_timings is a HashMap<Pubkey, ProgramTiming>, where each ProgramTiming internally holds a Vec<u64> to track Compute Units consumed for unsuccessful program execution, and count such occurrence. During block execution, this map is updated per instruction by program Pubkey to track execution timing. This happens for every instruction executed across the block.

Based on a simple benchmark, this timing instrumentation adds ~200µs of overhead per block, solely due to the bookkeeping logic.

However, this tracking has become obsolete:

Thus, the current reporting is largely redundant, if not wasteful.

Proposed Solution

Submit a PR (#6112) that removes ProgramTimings instrumentation entirely to:

  • Eliminate ~200µs of overhead per block.
  • Simplify execution path and reduce unnecessary memory churn.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions