-
Notifications
You must be signed in to change notification settings - Fork 49
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
Crazy idea: static char arrays instead of global frame_names #79
Comments
I see this as a place where the language is currently a little bit lacking. My plan was to stick with the current hack until Julia improves. Related Julia issues/PRs:
If this becomes a real problem for you or anybody else, I can try what you proposed. I guess for now, try not to create new frames at every time step of your control algorithm or simulation, or if you must, manually remove the |
Ok, makes sense. I'll let you know if the hack ever causes real problems. |
Another option is to make it possible to have anonymous frames for transient use (e.g. have |
You know what, I'm pretty happy with the current solution; no issues related to this after months, so I'll close this. |
The global
frame_names
map has a somewhat scary problem in that every new coordinate frame causes that list to grow, and old entries can never be deleted. So far this hasn't actually cause any measurable issues for me, but it's still concerning.What if, instead, we used a fixed-size static array of Chars instead of the Int64 reference? That might look something like:
This has the obvious problem that it makes the stack-allocated size of a frame much, much larger. That alone might be enough to make this a very bad idea. However, it does result in an
isbits
type that doesn't require a global reference.The text was updated successfully, but these errors were encountered: