godotengine / godotengine/godot-docs
Add worst-case runtimes for methods in the class reference
- Dominant language
- reStructuredText
- Stars
- 5.7k
- Forks
- 3.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 25
Description
This is just a documentation suggestion, but it'd be so nice to have runtimes right in the documentation for all methods - just the worse case O should be fine.
For example, in Array the `pop_back()` is O(1) while the `pop_front()` is O(n) (if I remember correctly). While in most cases the n in O(n) is so small it doesn't really matter, it's just a nice to know. Why use a slower method when you can use a faster one (if it's logically trivial to use one or the other)?
For most methods this would be pretty simple, as most are either O(1) or O(n). Maybe just for critical methods they can have a note saying they run linearly or higher (since most methods seem to be O(1) anyways).
Any thoughts on this?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.