anchor icon indicating copy to clipboard operation
anchor copied to clipboard

[WIP] Cache bumps in a generated struct instead of a BTreeMap

Open billythedummy opened this issue 2 years ago • 5 comments

Finally got round to hacking out the suggestion I brought up in https://github.com/coral-xyz/anchor/pull/1367#issuecomment-1033359105.

Current status:

  • Think the changes to lang/ work but I'll need a lot of help refactoring the rest of the examples and tests and cli to work with this change.
  • Made this repo to demo the differences in terms of both code and perf

Given the massive breaking changes this will result in, it's totally understandable if you guys decide that this change isn't worth it

billythedummy avatar Jul 16 '22 05:07 billythedummy

@billythedummy is attempting to deploy a commit to the coral-xyz Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Jul 16 '22 05:07 vercel[bot]

It's definitely an interesting idea. I will try to confer with armani at some stage about the relative benefits / arguments for using a generated struct for bumps instead of a btree map. There must have a good reason to go with a btreemap in the first place but can definitely consider the generated struct approach going forward.

Henry-E avatar Nov 28 '22 16:11 Henry-E

Hey @billythedummy, any news about this?

Aursen avatar Jun 09 '23 08:06 Aursen

Hey @billythedummy, any news about this?

sry i pretty much forgot about this PR bec i was working on other stuff. The impl is pretty much done here, i just couldnt be bothered to modify the tests if this wasn't going to be merged in anyway. Probably better to close this and restart from latest master at this point in time if this is something people want

billythedummy avatar Jun 12 '23 05:06 billythedummy

Okay, I'll take care of it, so thank you very much for all your hard work

Aursen avatar Jun 12 '23 07:06 Aursen