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

Using the symbol table for strings too #58

Closed
Geal opened this issue Dec 18, 2020 · 3 comments
Closed

Using the symbol table for strings too #58

Geal opened this issue Dec 18, 2020 · 3 comments

Comments

@Geal
Copy link
Contributor

Geal commented Dec 18, 2020

The difference between strings and symbols can be confusing, because there are special symbols, #authority and #ambient, and normal symbols that can be user defined. Those are just be considered as special strings with limited constraints checks, and a bit faster to compare since they're actually stored as an index in the symbols table.
I'd propose that we store all strings in the symbol tables (this can reduce storage size as strings tend to be repeated) and reserve the symbol type to reserved symbols (only #authority and #ambient for now).
This would require that the Datalog engine accesses the symbol table during execution (for string constraints checks)

@Geal Geal mentioned this issue Dec 18, 2020
17 tasks
@meh
Copy link

meh commented Dec 18, 2020

Seems reasonable, have you also considered compression a la DNS?

It'd likely save space with paths, domains and such, at no cost.

@Geal
Copy link
Contributor Author

Geal commented Dec 18, 2020

it might make he format a lot more complex though. Symbol tables already come with a high complexity budget, since they must support adding strings at each new block

@Geal
Copy link
Contributor Author

Geal commented Feb 25, 2022

v2 now uses the symbol table for strings #72

@Geal Geal closed this as completed Feb 25, 2022
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

No branches or pull requests

2 participants