Better HN
topnewbestaskshowjobs
Log inSign up

codedokode

9,867 karma · joined Aug 20, 2015 (11y ago) · 5,528 submissions

PHP developer from Russia.
Submissions

comment 1y ago · link · parent

It is interesting that Russian government also believes that Wikipedia spreads misinformation, Western deceitful propaganda and plainly breaks the laws. Especially in articles related to politics and the war.

Difficult to live in a world where everyone has its own version of "truth".

comment 1y ago · link · parent

The load instruction has a dependency on counter increment. While with packed SIMD one can issue several loads without waiting. Also, extra counter instructions still waste resources of a CPU (unless there is some dedicated hardware for this purpose).

comment 1y ago · link · parent

Makes sense - writing or updating software is easier that designing or updating hardware. To illustrate: anyone can write software but not everyone has access to chip manufacturing fabs.

comment 1y ago · link · parent

> Any modern out-of-order core will (on the happy path) schedule the operations identically whether you did one copy per loop or four.

I cannot agree because in an unrolled loop you have less counter increment instructions.

comment 1y ago · link · parent

> load and increment address register in a single instruction is extremely valuable here

I think this is not important anymore because modern architectures allow to add offset to register value so you can write something like, using weird RISC-V syntax for addition:

    ld r2, 0(r1)
    ld r3, 4(r1)
    ld r4, 8(r1)
These operations can be executed in parallel, while with auto-incrementing you cannot do that.

comment 1y ago · link · parent

> Which still means you have to write your code at least thrice, which is two times more than with a variable length SIMD ISA.

This is a wrong approach. You should be writing you code in a high-level language like this:

    x = sum i for 1..n: a[i] * b[i]
And let the compiler write the assembly for every existing architecture (including multi-threaded version of a loop).

I don't understand what is the advantage of writing the SIMD code manually. At least have a LLM write it if you don't like my imaginary high-level vector language.

comment 1y ago · link · parent

I think that SIMD code should not be written by hand but rather in a high-level language and so dealing with tail becomes a compiler's and not a programmer's problem. Or people still prefer to write assembly be hand? It seems to be so judging by the code you link.

What I wanted is to write code in a more high-level language like this. For example, to compute a scalar product of a and b you write:

    1..n | a[$1] * b[$1] | sum
Or maybe this:

    x = sum for i in 1 .. n: a[i] * b[i]
And the code gets automatically compiled into SIMD instructions for every existing architecture (and for large arrays, into a multi-thread computation).

comment 1y ago · link · parent

Variable length vectors seem to be made for closed-source manually-written assembly (nobody wants to unroll the loop manually and nobody will rewrite it for new register width).

comment 1y ago · link · parent

I think that packed SIMD is better in almost every aspect and Vector SIMD is worse.

With vector SIMD you don't know the register size beforehand and therefore have to maintain and increment counters, adding extra unnecessary instructions, reducing total performance. With packed SIMD you can issue several loads immediately without dependencies, and if you look at code examples, you can see that the x86 code is more dense and uses a sequence of unrolled SIMD instructions without any extra instructions which is more efficient. While RISC-V has 4 SIMD instructions and 4 instructions dealing with counters per loop iteration, i.e. it wastes 50% of command issue bandwidth and you cannot load next block until you increment the counter.

The article mentions that you have to recompile packed SIMD code when a new architecture comes out. Is that really a problem? Open source software is recompiled every week anyway. You should just describe your operations in a high level language that gets compiled to assembly for all supported architectures.

So as a conclusion, it seems that Vector SIMD is optimized for manually-written assembly and closed-source software while Packed SIMD is made for open-source software and compilers and is more efficient. Why RISC-V community prefers Vector architecture, I don't understand.

comment 1y ago · link · parent

You can say the same about drawing of a cat: you are not inventing new animal here. But for some weird reason cats are copyrighted and letters are not.

There are many ways to draw the same letter, as there are many ways to draw a cat.

Also if one draws letters that look like cats, will they fall under copyright protection?

comment 1y ago · link · parent

Not every font is digitized from old samples.

comment 1y ago · link · parent

Is this fair? It actually takes a lot of work (I assume) to design letter's shapes. Of course, not counting those who just trace 16-th century font without paying a compensation.

comment 1y ago · link · parent

Fair point, but if your desktop is locked down then you might not be able to use administrator privileges that many programs require for installation (especially software that uses DRM and licenses). So you might be not able to run the software even if there was a Windows version.

comment 1y ago · link · parent

> Isn't Disqus a third-party service? Doesn't it use a cookie to know you have signed in?

Let's say Disqus JS code is embedded on a site A. Then it can set cookies for that domain. So when you enter your Disqus login and password on site A, it can send a request to Disqus server, obtain authorization token and save it in cookies for domain A. This way you will be recognized every time you visit site A.

This means that operators of site A may access those cookies too, but I don't see any problem here - it's their site anyway.

> If you put a Disqus comment form or Google Analytics in your website, wouldn't you need a cookie popup to comply with GDPR and similar regulations that regulate sending user data to third-parties?

Probably you need.

> Is 3P cookie supposed to be about the domain of the cookie?

3P cookie means that when site A includes content from site B (image, iframes) then the browser will send domain B's cookies with the request for that content. This means that if content from site B is included on 100 different websites, site B can track the user across them using cookies.

So when you sign into Disqus, it can recognize (and track your actions) you on any site using Disqus widget.

When 3P cookies are disabled, requests for content embedded from other sites like B, will be anonymous and without cookies. You will have to log into Disqus for every site where you want to leave a comment.

comment 1y ago · link · parent

> First-party comments? Now you need your own comment system

This is incorrect. Without 3P cookies widgets like Disqus cannot track (and automatically sign-in) user across different websites, but everything else including posting comments or liking them should work, you just need to sign-in on every website instead of doing it once.

> Any website can add Google Analytics by copy and pasting 1 line of code.

Again incorrect. Google Analytics doesn't need 3P cookies to count the number of visitors. Without 3P cookies it is just harder to correlate visits across different websites, which is what website owners don't really need, why are you supposed to know what competitor sites your users visit? None of your business.

And for cross-site authoriation there are standards like OpenID. So we could disable 3P cookies right now and Internet will work just fine.

comment 1y ago · link · parent

So basically Google added additional tracking and fingerprinting features (so called "Privacy Sandbox") as a replacement for 3P cookies, but decided not to remove them after all.

I think that independent from Google browser vendors should 1) stop adopting any APIs that extend fingerprinting surface and 2) gradually lock down APIs that allow fingerprinting by putting them behind permissions.

comment 1y ago · link · parent

Why not make a warning, for example when someone calls from certain Asian country to US, warn that this call comes from this country and can be a scam?

comment 1y ago · link · parent

It doesn't need to be lifetime, only as long as devices are supported. Also, electricity meters makers somehow solved this problem. I am sure a subscription won't be expensive if the device doesn't use too much data. Also the device maker can pay with collected data or advertisement.

comment 1y ago · link · parent

GSM module? I think it costs several dollars. They are already installed into electricity meters for example.

comment 1y ago · link · parent

Can it be used as FPGA config RAM? Also, maybe for faster SSDs?

comment 1y ago · link · parent

What is the use case for an embedded terabyte-scale database, by the way?

comment 1y ago · link · parent

I was under impression that servers and databases generally run on Linux though.

comment 1y ago · link · parent

I found in the article that the column uses 70 Mb of storage. if it was sorted (i.e. if it was an index) it would take even much less space. I don't understand though how they loaded 70 Mb of data with 125 MiB/s SSD in 70 ms.

comment 1y ago · link · parent

They mentioned that they use 125 MiB/s SSD. However, one can notice that the column seems to contain only about 47500 unique values. Probably there are many reviews with zero or one votes. This column is probably stored compressed so it can be loaded much faster.

comment 1y ago · link · parent

You cannot be "independent" from the government on this planet.

comment 1y ago · link · parent

An ordinary person might be not able to fool this technology but I am sure 3-letter agencies can easily sign any picture.

comment 1y ago · link · parent

But famous American themselves call their country "America".

comment 1y ago · link · parent

Cannot they be produced in China once China develops the technology? As far as I remember, they don't use the latest process node anyway.
1
535455
185