yannjor / krabby

Print pokemon sprites in your terminal
GNU General Public License v3.0
136 stars 8 forks source link

Add column to feature table of pokemon sprite terminal scripts #3

Closed acxz closed 2 years ago

acxz commented 2 years ago

Hey @yannjor I finally got around to testing your codebase and added a column to the comparison table.

Let me know if you have any qualms or suggestions.

One thing to note, is that the bash script pokeget (cached) is actually faster than krabby (cached). I was wondering if you have any thoughts and if u can also reproduce those results.

Comparing with the old version of the bash script, I get that krabby is 1.3x slower instead of 7x faster.

yannjor commented 2 years ago

Hey @acxz that's cool thanks :)

That's weird about the speeds. I did some testing again with your script and I get that krabby is indeed about 1.3x slower than pokemon-colorscripts when printing a specific pokemon and only a tiny bit faster when printing random pokemon. I can't reproduce your results with pokeget however. Do you need enable the caching somehow?

Now I wonder how I ever got the 7x number :D Maybe I compared it to the python version instead by mistake somehow.

I will update my README to reflect this.

acxz commented 2 years ago

Do you need enable the caching somehow?

Yes I did enable caching (by editing the ~/.config/pokeget/pokeget.conf file) it is not default behavior.

Thank you for testing it out and being honest.

Yea, I did feel like a speed up from a compiled program for this task was a bit fishy, but I'm glad you created this project and gave us the data point for it. For simple tasks like these, shell is gonna be really hard to beat. Of course, maybe when you add a lot of features/have a larger codepath (like in pokeshell) a compiled program is most likely gonna be better.

If you do want to try another pass at getting something faster take a look at oil. It's supposed to be a shell lang that is a more modern take. idk if ur interested or not, but thought I'd mention it. It may not even be faster than bash, as it does have more overhead than bash I believe.

acxz commented 2 years ago

btw feel free to send PRs to that table, when u incorporate more features/add improvements