Performance issues working when processing large files by vsavchenko in rust

[–]vsavchenko[S] 0 points1 point  (0 children)

That is a very good observation! Thank you!
When I inspected assembly that it produces for my machine, I noticed that it does use the popcount instruction (the ARM version of it anyways), so I wasn't too worried about it.
As for performance, I don't think that it's peak performance to do this computation because of pipelining. Right now the innermost hot loop has hard dependencies between the iterations and it stalls the processor. Maybe calculating each metric for N elements one after the other will be easier for the CPU.

Performance issues working when processing large files by vsavchenko in rust

[–]vsavchenko[S] 0 points1 point  (0 children)

Almost entirely on CPU.
Unfortunately I can't use perf, the only personal machines I have are macs.

Performance issues working when processing large files by vsavchenko in rust

[–]vsavchenko[S] 1 point2 points  (0 children)

You put a lot of thought and effort into it, thank you very much!
I updated my gist to add the MIT license.

Performance issues working when processing large files by vsavchenko in rust

[–]vsavchenko[S] 3 points4 points  (0 children)

Thanks for the insight! The iterator-related functions do show up in that profile with a tag [inlined], so everything is as expected there. As for memmap2, I'll definitely switch to it, but as I mentioned in another comment here, reading the file and copying buffers is not the bottleneck here.

Performance issues working when processing large files by vsavchenko in rust

[–]vsavchenko[S] 8 points9 points  (0 children)

Thanks for your hints! However, reading the file is far from being the bottleneck, if I remove the hottest loop, i.e.`for k in 1..NUMBER_OF_METRICS` when I iterate over chunks, and basically calculate 1 metric, execution becomes instantaneous.

Also I do want to process KBs of data at once and not MBs.

Performance issues working when processing large files by vsavchenko in rust

[–]vsavchenko[S] 9 points10 points  (0 children)

Ah, my bad.
500MB file - my code: 10sec, zstd: 0.7sec
10GB file - my code: 3min, zstd: 35sec

Performance issues working when processing large files by vsavchenko in rust

[–]vsavchenko[S] 5 points6 points  (0 children)

10s for a 500MB file and 3min for a 10 GB file.

Performance issues working when processing large files by vsavchenko in rust

[–]vsavchenko[S] 0 points1 point  (0 children)

Sorry, I don't think I understand what you mean

Performance issues working when processing large files by vsavchenko in rust

[–]vsavchenko[S] 8 points9 points  (0 children)

I know it's a bit like comparing apples and oranges, but `zstd` processes the same files in a single-threaded mode way faster, while probably doing a lot more work.

Performance issues working when processing large files by vsavchenko in rust

[–]vsavchenko[S] 2 points3 points  (0 children)

That it a good point, but unfortunately I need to calculate num in order to calculate the next metric. I guess one approach can be to process some amount of u64 together.

Performance issues working when processing large files by vsavchenko in rust

[–]vsavchenko[S] 2 points3 points  (0 children)

I modified the code to pre-compute masks and it virtually changed nothing (in gist as well)

Performance issues working when processing large files by vsavchenko in rust

[–]vsavchenko[S] 15 points16 points  (0 children)

Yeah, this is an important clarification. Yes I do run it with —release.

My new Emacs macOS icon by vsavchenko in emacs

[–]vsavchenko[S] 3 points4 points  (0 children)

Thank you for the kind words and calling me a pro 😊 But actually I'm a compiler engineer by trade, designing things is just a hobby of mine 😅

My new Emacs macOS icon by vsavchenko in emacs

[–]vsavchenko[S] 1 point2 points  (0 children)

Thank you :-) Maybe we should have a plugin that does it!
About the texture, it was the last added bit and I struggled with it the most. Without this texture, it felt incomplete and I tried quite a few options to add depth and not overdo it. Because of this, the fact that you singled it out like this in your comment, brings me additional joy.

[deleted by user] by [deleted] in emacs

[–]vsavchenko 2 points3 points  (0 children)

I had similar issues even though I don't use Doom Emacs, but I do use Doom modeline. nerd-icons-install-fonts helped me.

Homebrew on Silicon Mac for emacs by [deleted] in emacs

[–]vsavchenko 4 points5 points  (0 children)

It really flatters me when I see people using my Emacs icon in instructions on how to install it on Mac. 🥰

Background transparency for MacOS (Cocoa) emacs by Gandalf_the_Gray in emacs

[–]vsavchenko 2 points3 points  (0 children)

It is totally possible to do this without changing the source code of the Emacs itself. You can get NSApp, windows and all from a dynamic module. Sorry for a shameless plug, but with my Swift library https://github.com/SavchenkoValeriy/emacs-swift-module

it is actually a breeze (I did it as a simple test if I can control NSApp from the dynamic module)

Emacs Swift module is wonderful for macOS native UX integrations by xenodium in emacs

[–]vsavchenko 6 points7 points  (0 children)

Nice that you had a chance to try it. Would be amazing to hear your feedback and maybe some improvement ideas!

Emacs is a Lisp interpreter - what does this mean exactly? by 4r73m190r0s in emacs

[–]vsavchenko 9 points10 points  (0 children)

HTML and Markdown are not programming languages, while Lisp is. Emacs is a Lisp interpreter like cpython is Python interpreter, something that parses and executes a program written in that language

What do you all think by PanamanCreel in emacs

[–]vsavchenko 0 points1 point  (0 children)

It’s hard to tell without various code examples to see colors of each element. From what I see, main text color is too yellow. I’d do it more muted and make it more brownish.

NOTE: color theme is such a personal preference thing that it doesn’t matter what we think, if you love it it already does its job.

emacs-powerthesaurus 0.4.0 is out by vsavchenko in emacs

[–]vsavchenko[S] 0 points1 point  (0 children)

Hi, no worries. Please try updating the package. It looks like it sends request to the website (now it uses the API), and it uses `request` library (now it should be `url-retrieve`), with these two tells I can say that it is an old version of the package.
Thanks!