Conversation
|
🚀 Deployed on https://6797fa706daef387b3426d93--noir-docs.netlify.app |
|
FYI @noir-lang/developerrelations on Noir doc changes. |
Right, my initial reaction would be that concat3 seems like it'd be something that may be better fit for a library. |
|
Fair enough. I'll close this one, and leave the |
|
To be honest I don't see any reason why the naive method of two calls to the concat function should be less efficient than concat3. Currently in ACIR, we optimise out the intermediate array. This may not be the case currently but as long as the compiler realizes that the intermediate array is not used other to create the next, then it should be the same. |
|
@TomAFrench I'd expect it to be roughly the same at least in acir but I would expect concat3 to be faster in brillig |
Description
This builds off #7199 (hence the diff also including the
concatmethod. I haven't learned graphite.I might've gone a bit far with this one: an ugly method called
concat3which concatenates 3 arrays. The question then becomes: where do you stop? Where does the madness end? 4? 5? Maybe extra ones should be created through some metaprogramming magic?Anyway, I would put concat3 to good use immediately, but I could also just use
concat. If you think that instead I should just useconcatand accept the slowdown due to the unnecessaryforloops when doingarr1.concat(arr2.concat(arr3)), I guess I could...Problem*
Resolves
Summary*
Additional Context
Documentation*
Check one:
PR Checklist*
cargo fmton default settings.