Skip to content

Closes #3567: Update encoding_benchmark - #4610

Merged
ajpotts merged 1 commit into
Bears-R-Us:masterfrom
ajpotts:3567_Update_encoding_benchmark
Jul 3, 2025
Merged

ajpotts merged 1 commit into
Bears-R-Us:masterfrom
ajpotts:3567_Update_encoding_benchmark

Conversation

@ajpotts

@ajpotts ajpotts commented Jun 13, 2025

Copy link
Copy Markdown
Contributor

PR: Refactor encoding_benchmark.py for Consistency and Correctness-Only Mode

This PR refactors the encoding_benchmark.py benchmark to follow the standardized structure used across Arkouda’s benchmark suite.

✅ Features

  • Correctness-Only Support (pytest.correctness_only=True)
    Automatically reduces problem size to 10**4 for fast validation runs.

  • Consistent Byte Tracking and Transfer Rate Calculation
    Benchmarked functions now return the number of bytes processed, enabling accurate throughput reporting via benchmark.pedantic.

🔧 Changes

  • Added helper functions:
    • generate_string_array(N) for string generation
    • compute_nbytes(a) for consistent byte size calculation
  • Wrapped encode and decode operations in functions that return nbytes
  • Unified variable names and formatting to match other benchmarks (e.g., numBytes, description, problem_size)

This cleanup improves readability, ensures consistency, and prepares the benchmark for correctness testing and future extensions.

Closes #3567: Update encoding_benchmark

@ajpotts
ajpotts force-pushed the 3567_Update_encoding_benchmark branch 2 times, most recently from d3a59d6 to 0dd5b96 Compare June 16, 2025 14:49
@ajpotts
ajpotts marked this pull request as ready for review June 17, 2025 13:42

@1RyanK 1RyanK left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Comment thread benchmark_v2/encoding_benchmark.py Resolved
Comment thread benchmark_v2/encoding_benchmark.py Resolved

@jaketrookman jaketrookman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides Ryan's comments, looks good

@ajpotts
ajpotts force-pushed the 3567_Update_encoding_benchmark branch from 0dd5b96 to 244fa5b Compare June 23, 2025 14:34
@ajpotts
ajpotts added this pull request to the merge queue Jul 3, 2025
Merged via the queue into Bears-R-Us:master with commit b21e9ce Jul 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update encoding_benchmark

3 participants