Hacker Newsnew | past | comments | ask | show | jobs | submit | Cold_Miserable's commentslogin

Intel don't have vpintersect. Its micro-coded dog slow but its such an obscure operation and of little use if any. I'd rather AMD re-invest the hardware into speeding up useful operations, shave 1 cycle off divide or square root or something.


Get-ItemProperty : Cannot find path 'HKCU:\SOFTWAREMicrosoftIdentityCRLExtendedProperties' because it does not exist. At line:1 char:7

I guess I'm good then.


You're missing all the backslashes, so of course it doesn't exist.


This is just a worse copy of the original ifma method. Sneller is even better for max throughput.


> Sneller is even better for max throughput.

I see https://sneller.ai/blog/avx512-itoa/, which reports ~0.75ns/number for <=7 bytes (compared to ~1ns/n for Champagne-Lemire, I would assume on 3 year newer hardware), but ~2.6ns/number for >=8 bytes (vs ~1.3ns/n for Champagne-Lemire). Perhaps it has improved in the 3 years since the blog post was written? Their main GitHub repository is no longer public, so I don't see a good way to test it myself.


I've yet to encounter a need for == equality for floating point operations.


I need it all the time. A very common case is caching of (expensive) computations. Let's say you have a parameter for an audio plugin and every parameter change requires some non-trivial and possibly expensive computation (e.g. calculation of filter coefficients). To avoid wasting CPU cycles on every audio sample, you only do the (re)calculation when the parameter has actually changed:

  double freq = getInput(0);
  if (freq != mLastFreq) {
    calculateCoefficients(freq);
    mLastFreq = freq;
  }
Also, keep in mind that certain languages, such as JS, store all numbers as double-precision floating point numbers. So every time you are writing a numeric for-loop in JS you are implicitly relying on floating point equality :)


Some environments only expose float as the number type, love2d being one I know. Fortunately love is built on LuaJIT, which does support integer math through the built-in ‘ffi’ library.

My multiplayer arena game rounds reasonably-sized floats and compares them in the presentation layer, but uses fixed point integer math in the core rollback simulation

(I believe JS is a similar story, its number can be either int or float with no way to guarantee integer-only math. I never needed to consider the difference outside of currency for webdev, so I’m less sure)


It went from ~30ns to 2K ns but mostly timed out when I changed the alignment to +7.5 QWORDs on Golden Cove.


Small indian. Starting at zero and extending is logical. Big indian is dumb and confusing.


That's me. 1 byte ASCII is all that's needed for text.


shlx doesn't alter the flag register.


SHLX does not support an immediate operand. Non-destructive shifts with immediate operands only arrive with APX, where they are among the most commonly used instructions (besides paired pushes/pops).


I found a jpeg2000 reference PDF somewhere. It may as well have been written in Mandarin. I got as far as extracting the width and height. Its much more advanced than jpeg. Forget about writing a decoder.



Heh. 1.Create fast modulus quad M for dword D for the first 2000? 200000? (xM)D 2.Eliminate 0b,101b 3.Divide using vrcp14ss/vdivss with correction. Use fast square root too using rsqrt14.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: