Paid episode

The full episode is only available to paid subscribers of Computer, Enhance!

Monday Q&A #13 (2023-05-29)

Answers to questions from last week's videos
6

Each Monday I answer questions from the comments on the prior week’s videos. Transcripts are not available for Q&A videos due to length. I do produce closed captions for them, but Substack still has not enabled closed captions on videos :(

Questions addressed in this video:

  • [00:13] “Why take an average instead of something like a hash? Sounds like a hash would be more reliable?

    I suppose it's difficult to get a stable hash with floating point numbers, but we can pick a fixed point. For example, multiply each number by 1000 then take the floor of that and feed it into the hash. This should give more stability?

    Am I missing something?”

  • [02:56] “How do you specify the clusters and how many are there? I suppose I could just restrict the theta and phi ranges and that way ill get square patches, I think. But you drew circles. Are you using some formula to generate the points inside circular patches and if yes will you tell what it is?”

  • [05:00] “If we could get away with the loss of precision and range, would it make sense to parse the numbers in the input json to half floats, since we'll likely do parsing in one loop and the actual computation in another? In the computation loop we'd have to spend cycles to extract the f32s from the f16s, but we'd be doubling the number of inputs we can read on the same bandwidth. Also, maybe AVX-512 actually has something that can work with f16s directly?”

  • [07:29] “While profiling I saw that the library I was using for plotting the configuration of clusters before I did the generation was causing a significant slowdown even if I didn't use it and simply just included its script tag in my page. Even if I learned how to fine tune assembly (I know we are not doing that here but I'm saying if I went that far), how will I ever apply this to the real world? If this was a real situation there would have been 15 other libraries bundled in by webpack and I would not even have been able to spot that it was this library that was the culprit.”

The full video is for paid subscribers

Programming Courses
A series of courses on programming topics.