CRC/Blake3 using multiple cores?

English support forum

Moderators: white, Hacker, petermad, Stefan2

Fla$her
Power Member
Power Member
Posts: 2361
Joined: 2020-01-18, 04:03 UTC

Re: CRC/Blake3 using multiple cores?

Post by *Fla$her »

Dalai wrote: 2022-10-07, 20:10 UTCI don't understand your conclusion.
After you have rejected your own words
Dalai wrote: 2022-10-07, 13:42 UTCAffinity can only limit the cores/threads available to a process, but it can't add anything.
>>>
Dalai wrote: 2022-10-07, 20:10 UTCthe number of cores/threads a process runs on can be increased again.
, this conclusion has ceased to be relevant.
Dalai wrote: 2022-10-07, 20:10 UTCIt's just a different way to assign process affinities. The tool can't do more than the OS allows.
You're confusing again. One more time. I didn't ask for any other way to set affinity, I asked for a program to get information about the distribution of the process load on the cores/threads.
Overquoting is evil! 👎
User avatar
Dalai
Power Member
Power Member
Posts: 9422
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: CRC/Blake3 using multiple cores?

Post by *Dalai »

2Fla$her
If you think my statements are contradictory, I suggest you read my posts again, maybe even read further into the topic via other (re)sources. Do your own testing in Windows Task Manager (or any other tool which can set process affinities), then think about what you see and come to your own conclusion. Maybe you'll see that my statements are not contradictory at all. That's all I have to say about this topic.
Fla$her wrote: 2022-10-07, 22:08 UTC I didn't ask for any other way to set affinity, I asked for a program to get information about the distribution of the process load on the cores/threads.
I don't know any such program but that doesn't mean there isn't any. It would have to be pretty low level though. But now we're completely off topic, which is why this is my last post regarding this tangent discussion.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Fla$her
Power Member
Power Member
Posts: 2361
Joined: 2020-01-18, 04:03 UTC

Re: CRC/Blake3 using multiple cores?

Post by *Fla$her »

Dalai wrote: 2022-10-07, 22:53 UTCIf you think my statements are contradictory, I suggest you read my posts again
This won't help, because I already had to reread them carefully to find something in them besides what was already stated in the previous answers, which I didn't need at all.
The problem is not that I do not understand what you are writing, the problem is that you are moving away from the context in which I am writing.
Fla$her wrote: 2022-10-07, 22:08 UTCI don't know any such program but that doesn't mean there isn't any.
It was worth stopping at this fact right away, the rest is an empty polemic. Thanks for participating.
Overquoting is evil! 👎
sirksel
Junior Member
Junior Member
Posts: 61
Joined: 2013-04-24, 10:24 UTC

Re: CRC/Blake3 using multiple cores?

Post by *sirksel »

Thanks to everyone so much for all the info. All educational for me. I understand what both nsp and Mr. Ghisler were saying too. On github, I was able to verify that the current C implementation of Blake3 isn't multithreaded, but the Rust version is. I'm sure it's only a matter of time before someone fixes that! Sounds like Mr. Ghisler will include the multithreaded version whenever it becomes available. I'll keep an eye out for it. Thanks again!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48166
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: CRC/Blake3 using multiple cores?

Post by *ghisler(Author) »

If anyone here is familiar with Rust and wants to create a DLL, here is how I call the Blake3 library:

Code: Select all

void* APIENTRY Blake3Init()
{
	blake3_hasher* hasher;
	hasher = (blake3_hasher*)malloc(sizeof(blake3_hasher));
	blake3_hasher_init(hasher);
	return hasher;
}

void APIENTRY Blake3Update(void* hasher, const void *input,	int input_len)
{
	if (hasher && input)
		blake3_hasher_update((blake3_hasher*)hasher, input, input_len);
}

void APIENTRY Blake3Finalize(void* hasher, uint8_t* output, int len)
{
	if (hasher) {
		if (output)
			blake3_hasher_finalize((blake3_hasher*)hasher, output, len);
		free(hasher);
	}
}
So it's just 3 functions which need to be implemented in a replacement DLL.
Author of Total Commander
https://www.ghisler.com
sirksel
Junior Member
Junior Member
Posts: 61
Joined: 2013-04-24, 10:24 UTC

Re: CRC/Blake3 using multiple cores?

Post by *sirksel »

I looked at it, but I don't have any Rust experience either. Also, I was wondering... for some reason, I had it in my head that Total Commander was written in Delphi. Was that an earlier incarnation, or maybe I'm thinking of some other utility I use?

Anyhow, hopefully there are some excellent Rust devs among the Total Commander user base who can help us convert the crate (or whatever the proper parlance is) to a DLL! :) Many thanks for looking into it!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48166
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: CRC/Blake3 using multiple cores?

Post by *ghisler(Author) »

Yes, TC is written mostly in Delphi because it is very easy to make a user interface and custom controls with it. Many of the dlls and plugins (also most of my own) are in C/C++ though, because there is a lot of sample code and libraries which can be used freely (no GPL code, LGPL and other licenses like Apache are OK). Delphi can be used to call and to create dlls just fine.
Author of Total Commander
https://www.ghisler.com
miskox
Member
Member
Posts: 170
Joined: 2003-06-11, 06:00 UTC

Re: CRC/Blake3 using multiple cores?

Post by *miskox »

@ghisler: if it is not a secret: how many lines of source code does TC have?

Thanks.
Saso
#224551
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48166
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: CRC/Blake3 using multiple cores?

Post by *ghisler(Author) »

It's difficult to count because I also use modified Delphi libraries now, e.g. to support dark mode or Unicode.
Author of Total Commander
https://www.ghisler.com
Post Reply