Skip to content

Update benchmark README with latest performance data and add interactive HTML visualization #57

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 25, 2025

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jun 25, 2025

This PR updates the benchmark documentation with fresh performance data and adds an interactive HTML visualization for better analysis of the JSON5 performance comparison.

Changes Made

📊 Updated benchmark/README.md

  • Refreshed performance data table with latest benchmark results from benchmark_results_2025-06-25_01-31-43.csv
  • Updated overall performance comparison statistics:
    • JSON is 4.45× faster than JSON5 (previously 3.90×)
    • JSON is 2.51× faster than External-JSON5 (previously 2.75×)
    • External-JSON5 is 1.77× faster than JSON5 (previously 1.42×)
  • Added documentation for the new HTML visualization file
  • Updated example output snippets with current timing data

🎯 Created benchmark_visualization.html

  • Self-contained HTML file using Chart.js (widely known charting library as requested)
  • Interactive visualization with multiple chart types:
    • Performance by data type and operation - Bar chart showing detailed comparison across all test cases
    • Serialization vs deserialization - Bar chart comparing average performance by operation type
    • Overall performance comparison - Doughnut chart showing relative performance distribution
    • Performance ratios - Bar chart displaying "times slower" multipliers
  • Responsive design with modern styling
  • Embedded actual benchmark data from the latest CSV results
  • Can be opened directly in any web browser

Key Performance Insights

The latest benchmark data shows consistent performance patterns:

  • JSON (kotlinx.serialization) remains the performance leader across all scenarios
  • External-JSON5 provides good JSON5 features with reasonable performance
  • JSON5 (this project) offers seamless kotlinx.serialization integration but at a performance cost

Testing

  • ✅ All existing tests pass (./gradlew :benchmark:test)
  • ✅ Build succeeds (./gradlew :benchmark:build)
  • ✅ HTML file is valid and contains expected 4 interactive charts
  • ✅ Documentation is consistent and up-to-date

The interactive visualization makes it easy to analyze performance trends and understand the trade-offs between the three JSON libraries.

Fixes #56.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: hossain-khan <99822+hossain-khan@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] Update benchmark readme Update benchmark README with latest performance data and add interactive HTML visualization Jun 25, 2025
@Copilot Copilot AI requested a review from hossain-khan June 25, 2025 01:36
Copilot finished work on behalf of hossain-khan June 25, 2025 01:36
@hossain-khan hossain-khan marked this pull request as ready for review June 25, 2025 01:50
@hossain-khan hossain-khan merged commit 4ec3a22 into main Jun 25, 2025
2 checks passed
@hossain-khan hossain-khan deleted the copilot/fix-56 branch June 25, 2025 01:52
@hossain-khan
Copy link
Owner

Screenshot 2025-06-24 at 22-57-30 JSON5 Performance Benchmark - Interactive Visualization

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 benchmark readme
2 participants