Fastfetch has bash in it now #2
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A recent commit added NIC to fastfetch, while this addition is undoubtedly valuable, the implementation is written in bash which is slow and cringe
Please fix
Hi @nbrooks211,
Thank you for bringing this to our attention. I understand your concerns regarding the performance impact of using Bash for the NIC implementation.
I've conducted a comparison of various implementations of NIC fetching, including Lua, Bash, and Python, and here are the execution times for each:
Lua Implementation:
Bash Implementation:
Python Implementation:
As the results indicate, both the Bash and Lua implementations are fast and perform well within an acceptable range for most users. Additionally, these two languages were chosen because they do not require precompiled binaries, making them more versatile and easier to use across different systems.
Given these findings, while the Bash script does have a slightly higher execution time compared to Lua, it remains a practical and efficient solution. However, we will continue to explore potential optimizations to further enhance performance.
Please let me know if there are any other concerns or suggestions you might have.
Best,
logan2611
I have made a faster implementation that doesnt require precompiled binawies in C
just have tcc installed and just run the C file (by using ./).
Hi @nbrooks211,
Thank you for providing your C implementation. I have tested it, and indeed it performs faster, clocking in at 6.88 milliseconds. The use of
#!/bin/tcc -run -lpci
effectively achieves the desired behavior of not needing precompiled binaries specific to architecture and distro.However, it's important to note that TCC only supports x86 architectures. While this solution does improve performance, it sacrifices portability compared to Lua and Bash, which are more versatile across different systems.
Given this limitation, we need to consider the broader user base who might be on different architectures. Thus, while your C implementation is an excellent option for those on x86 systems, we will continue using Lua and Bash for their broader compatibility.
Thank you for your contribution and understanding. Please let me know if there are any other suggestions or concerns you have.
Best,
logan2611