-
Notifications
You must be signed in to change notification settings - Fork 14
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
Agnostic Omniscience Profiler #12
Comments
This idea is very interesting @daniel-severo! Should we have multiple solutions of the same language or should we compare different languages? I'd like to hear your thoughts as well, @murilocamargos, @fredericojordan and @caian-gums. In the particular case you illustrated above, I think we should just optimize the code that's already in the repository, since it's very clear that the generator expression is more memory efficient. |
I think the generator version will consume less memory, but will be slower (since the computer itself is simple and generators have some overhead). So that would be interesting to compare also. |
We could have different versions of the same problem solved by the same language (e.g. 001v1.py, 001v2.py, ...) and compare time and memory consumptions both within the same language and against other languages. This way, we don't need a snippets directory as suggested in #6 because we would be opening space for adding more efficient code without removing the old one. |
As my point of view, we have some issues to be discussed. The main point of the repo is:
As I think that the most important now is have the most efficient solution, we should have just one file per language. On future, we can have something like:
And if someone finds a new better solution or better performance solution, just open a PR to the already submitted solution and change the small portion of it or the entire code. |
Not sure it's that simple. "The best solution" doesn't exist. The example above illustrates this: one consumes less RAM the other CPU time. |
IMHO, we should strive to make the fastest running scripts, disregarding memory usage, since most of the problems are CPU-bound. |
👍 to @fredericojordan ideas (I think to keep the comparison on the wiki is the best option) |
@FrankKair, can you open the project's wiki? |
I just opened the wiki with a simple welcome message. About the profiler, a simple Maybe it's better to keep the info about time/cpu on the readme of each directory, to be more easily accessible and use the wiki to post more complex solutions strategies. What do you guys think? An example with problem001:
or
(The numbers are for illustrations purposes only, not the actual code being tested). |
Or maybe we could have a separate file on each folder called profiling, or performance, like so: Not sure what's the best way to go here 😅 |
@daniel-severo If you read my comment you'll see that when I said 'best solution' I meant to say 'the best solution based on our parameters'. I agree with you that the best solution is something too vague that we have to decide where we make the cut. @FrankKair Thanks for opening the wiki! I think we can place that content on |
I noticed that in #69 we got some 'functional approach' to JS code of solution I think we can discuss about this specific topic of exactly how we should to the approve or reject of the 'best solution' if this is not set up right now. |
Would be interesting to see comparisons between different versions automagically.
For example: the current solution to 001 with list comprehensions in contrast to a generator expression
Storing a README in each subdirectory with the current stats (cpu time and memory consumption) would be nice.
The text was updated successfully, but these errors were encountered: