seedwing-io / seedwing-policy

A functional type system for policy inspection, audit and enforcement.
https://www.seedwing.io
Apache License 2.0
12 stars 15 forks source link

Performance improvements #224

Closed lulf closed 1 year ago

ctron commented 1 year ago

LGTM. I got two questions: a) how much does it improve the performance b) what's the reason for using Arc<str> over Cow<str>?

lulf commented 1 year ago

a) About 15-20% , no clone() b) Since we never modify the content, i.e. they're all immutable strings, I think Arc is more in line with usage. I also think Cow might require Arc<Cow> unless it does some trickery to support Send + Sync .