Skip to content
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

feat: Implement #599 #748

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Veykril
Copy link
Member

@Veykril Veykril commented Mar 7, 2025

Currently looking into #599, this change makes things a bit simpler to overview removing some back and forth in code paths

Copy link

netlify bot commented Mar 7, 2025

Deploy Preview for salsa-rs canceled.

Name Link
🔨 Latest commit 5c7a7c5
🔍 Latest deploy log https://app.netlify.com/sites/salsa-rs/deploys/67cadb52f1cbd6000868832c

Copy link

codspeed-hq bot commented Mar 7, 2025

CodSpeed Performance Report

Merging #748 will improve performances by 3.28%

Comparing Veykril:veykril/push-zmlovtwvwxty (d1f6e52) with master (9d2a978)

Summary

⚡ 1 improvements
✅ 10 untouched benchmarks

Benchmarks breakdown

Benchmark BASE HEAD Change
amortized[Input] 3.7 µs 3.6 µs +3.28%

@Veykril Veykril force-pushed the veykril/push-zmlovtwvwxty branch from d1f6e52 to 5c7a7c5 Compare March 7, 2025 11:41
@Veykril Veykril changed the title Simplify some function ingredient things feat: Implement #599 Mar 7, 2025
@Veykril Veykril marked this pull request as draft March 7, 2025 11:41
@Veykril
Copy link
Member Author

Veykril commented Mar 7, 2025

So implementing the memo table part is actually trivial, the real issue is the dependency tracking as that goes through the type erased ingredient trait and now we have potentially more keys than just an ID ...

@Veykril
Copy link
Member Author

Veykril commented Mar 7, 2025

I just realized, all of this is probably unnecessary! Instead of interning the additional arguments, can't we just synthesize a new tracked struct with each arg being a field? That would trivial fix things from what I can tell?

@MichaReiser
Copy link
Contributor

MichaReiser commented Mar 7, 2025

That won't work because you can't create tracked structs from outside a query. Each tracked struct also gets a new id (it's uniqueness is defined by its instance not only its values). It would limit multi argument queries to only be callable from other queries.

It's also not clear to me how that's different from interning?

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.

2 participants