Toots for mbr@mastodon.gamedev.place account

Written by Marc B. Reynolds on 2025-01-07 at 12:29

Science!

https://arxiv.org/abs/2501.00536

=> More informations about this toot | View the thread

Written by Marc B. Reynolds on 2024-12-21 at 08:35

A little over a month ago the Zed (editor) team put up a blog post on their text representation

https://zed.dev/blog/zed-decoded-rope-optimizations-part-1

(A B-tree of 128 byte payloads...interesting) and an optimization related to that which is "find n^th bit set" for precomputed return positions in payload side-line info. Two thoughts:

  1. Interesting solution but n^th bit operations on hardware supporting bit-scatter can be performed in a couple of cycles.

https://gcc.godbolt.org/z/njde5bob6

=> More informations about this toot | View the thread

Written by Marc B. Reynolds on 2024-12-06 at 14:44

Tossed together a gist of tomfoolery:

  1. generate a random number with a given population count (portable, bisection method)

  1. perform a random bit permutation of the input. (needs PDEP or SAG like op in hardware to be usable)

  1. not quite random versions of (2)

  1. use (2) or (3) to produce stateful variants of (1)

https://gist.github.com/Marc-B-Reynolds/45a1742df711a1046981b8221311d1b4

=> More informations about this toot | View the thread

Written by Marc B. Reynolds on 2024-11-20 at 17:52

In honor of the CRC Press releasing a new book on Posits let me do a "flashback Wednesday":

https://marc-b-reynolds.github.io/math/2019/02/06/Posit1.html

=> View attached media

=> More informations about this toot | View the thread

Written by Marc B. Reynolds on 2024-11-13 at 10:41

LOL! display equations are showing up correctly in Firefox. Every time I do a little HTML I'm really happy this isn't my job.

=> More informations about this toot | View the thread

Written by Marc B. Reynolds on 2024-11-12 at 19:44

I wanted a single-file doc using @morgan3d's markdeep with plots using plotly. Hacked together something that mostly works (display equations are ending up left aligned instead of centered is the only flaw I've noticed).

Here's a stripped down version if this is useful to anybody else:

https://gist.github.com/Marc-B-Reynolds/27ac2564f26b4bb0f9c1cce87e480c4d

=> More informations about this toot | View the thread

Written by Marc B. Reynolds on 2024-11-11 at 08:39

Idle curiosity question: The 0.9999... = 1 in Reals thing. I keep seeing that presented as true but isn't it like Ramanujan summation where you need to extend what is deemed as a legal transformation for it to be true?

=> More informations about this toot | View the thread

Written by Marc B. Reynolds on 2024-10-28 at 15:55

This is really strange. Both clang & GCC are defining the macro FINITE_MATH_ONLY without the option being enabled. A quick check and I'm not seeing either using finite only transforms.

https://gcc.godbolt.org/z/qWTh1GErc

=> More informations about this toot | View the thread

Written by Marc B. Reynolds on 2024-10-28 at 08:46

@lemire Stripped down version:

https://gcc.godbolt.org/z/41qd4GsM3

=> More informations about this toot | View the thread

Written by Marc B. Reynolds on 2024-10-28 at 08:08

FWIW: That Geoff Langdale question about byte gathers in AVX2 lead to @lemire pointing to a 16-bit elements in 128-bit reg gather which uiCA predicts at less that 4 cycles/iteration (skylake) in simdjson. Great example of super clever table lookups murdering computation.

https://github.com/simdjson/simdjson/blob/3c0d032dedcc3c87d4ef726a2f7a3c2a26a738b8/include/simdjson/westmere/simd.h#L119

=> More informations about this toot | View the thread

Written by Marc B. Reynolds on 2024-10-19 at 07:40

I've been slowing pulling out some various code snippet to toss out in the world and one thing (don't ask me why) I was doing was getting them to work with Visual C. I just don't get why they have done some thing that should be uber simple like support hex floats. This should be an hour of an interns time and a quick review. It's alien to me unless the parsing code is a nightmare. And restrict vs underscored and [static n]. Strange.

=> More informations about this toot | View the thread

Written by Marc B. Reynolds on 2024-10-17 at 11:36

TIL: Visual C doesn't respect (dropped in forward decl) type qualifiers (or at least restrict) when inlining.

https://gcc.godbolt.org/z/zWc41ebnc

=> More informations about this toot | View the thread

Written by Marc B. Reynolds on 2024-09-28 at 11:42

Noob compiler question. type-punning (via cast) a primitive array (say 64-bit integers) to a SIMD array is technically illegal (strict aliasing) but it's also (seemingly) ubiquitous. Do any of the main compilers (clang/gcc/vc) have a stance on this?

=> More informations about this toot | View the thread

Written by Marc B. Reynolds on 2024-09-27 at 08:08

There's been a few threads on tightening known values recently and I'm over here going:

"compiler! look deep in my eyes! you know nothing about this value! It just magically appeared in the register."

(SRLY: a hacky hint to attempt to prevent introduction of branches or constant loads from const folding/prop optims)

https://gcc.godbolt.org/z/EjsrnG8vc

=> More informations about this toot | View the thread

Written by Marc B. Reynolds on 2024-09-25 at 17:53

If forget. Which of the 9 circles of Hell did Dante reserve for people that use 1 based indexing for their method's pseudo-code in a paper?

=> More informations about this toot | View the thread

Written by Marc B. Reynolds on 2024-09-23 at 07:55

Forgot the citation: "Stupid is as Stupid Does: Taking the Square Root of the Square of a Floating-Point Number", Sylvie Boldo, 2015

https://inria.hal.science/hal-01148409

=> More informations about this toot | View the thread

Written by Marc B. Reynolds on 2024-09-23 at 07:13

Computing the quadratic came across my timeline and here's a nerdy factoid. We need to compute the shown term. A pair of "seemingly" special cases are if 'a' and/or 'c' are zero then the term reduces to 2b. However if computing b² neither under nor overflows then sqrt(b*b) is exactly equal to |b|. So there's no need to explicitly handle the (a==0) or (c==0) cases.

=> View attached media

=> More informations about this toot | View the thread

Written by Marc B. Reynolds on 2024-09-15 at 22:34

Jean-Guillaume Dumas has put out a number of matrix related papers in the past couple of years (some general and some for finite fields). Anyway one that could of interest to a couple of you is:

https://arxiv.org/abs/2402.05630

=> More informations about this toot | View the thread

Written by Marc B. Reynolds on 2024-07-16 at 21:32

I tossed together a AVX2 16x16 bit matrix transpose.

left: clang, right GCC.

https://gcc.godbolt.org/z/G31EnMo4a

[#]GF(2)

=> View attached media | View attached media

=> More informations about this toot | View the thread

Written by Marc B. Reynolds on 2024-07-14 at 01:51

When I look at some still "just about as good as you can do" code that was original written 40+ years ago I can't decide if it's annoying or awesome. Usually both at the same time.

Anyway. Inspired by Guy Steele's in register field swap.

=> More informations about this toot | View the thread

=> This profile with reblog | Go to mbr@mastodon.gamedev.place account

Proxy Information
Original URL
gemini://mastogem.picasoft.net/profile/65150
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
343.074579 milliseconds
Gemini-to-HTML Time
4.33386 milliseconds

This content has been proxied by September (ba2dc).