Skip to content

Conversation

@saulshanabrook
Copy link
Member

Exposes function-size egglog command in Python. Handles also turning egglog function back into Python functions if no function name is specified and all functions should be checked.

@saulshanabrook
Copy link
Member Author

@actions-user changelog

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds functionality to inspect function sizes in the Python EGraph API by exposing the function-size egglog command. This includes methods to get the size of a specific function or all functions, and handles conversion between egglog function names and Python callable objects.

Key Changes

  • Added function_size() and all_function_sizes() methods to EGraph class for inspecting function table sizes
  • Implemented create_callable() function to convert egglog function references back to Python callable objects
  • Added comprehensive test coverage for various callable types (functions, methods, constants, etc.)

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
python/egglog/egraph.py Adds function size inspection methods and ExprCallable type alias
python/egglog/runtime.py Implements create_callable utility and improves RuntimeClass/RuntimeFunction representations
python/egglog/egraph_state.py Fixes constructor/function registration logic for builtin classes
python/tests/test_high_level.py Adds comprehensive test coverage for function size inspection
docs/reference/egglog-translation.md Documents the new function size inspection functionality

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@codspeed-hq
Copy link

codspeed-hq bot commented Sep 1, 2025

CodSpeed Instrumentation Performance Report

Merging #338 will not alter performance

Comparing extract-report-warning (b5d7e7f) with main (b8c53e0)1

Summary

✅ 7 untouched benchmarks

Footnotes

  1. No successful run was found on main (b5d7e7f) during the generation of this report, so b8c53e0 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@saulshanabrook saulshanabrook merged commit 1a2ee10 into main Sep 2, 2025
18 checks passed
@saulshanabrook saulshanabrook deleted the extract-report-warning branch September 2, 2025 05:04
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.

3 participants