Creel
Creel
  • 243
  • 7 975 400
Double it Like Dekker 2: Dekker Multiplication and Division
Second part of an introduction to Double-Double Arithmetic. In this video, we look at Dekker multiplication and Division, as well as the two little helper functions that are often used to compute those operations.
Support What's a Creel? on Patreon: www.patreon.com/whatsacreel
FaceBook: whatsacreel/
Software used to make this vid: Visual Studio 2019 Community: www.visualstudio.com/downloads/
Audacity: www.audacityteam.org/
Davinci Resolve 16: www.blackmagicdesign.com/products/davinciresolve/
OpenOffice: www.openoffice.org/
Gimp: www.gimp.org/
Переглядів: 8 351

Відео

Double it Like Dekker: A Remarkable Technique to Double Floating Point Precision (Part 1)
Переглядів 41 тис.10 місяців тому
This video is an introduction to Double Double arithmetic. Which is a technique used to greatly improve the precision of floating point computations in programming. It was first proposed by T. J. (Dirk) Dekker in his paper from 1971. Link to Dekker's original paper: csclub.uwaterloo.ca/~pbarfuss/dekker1971.pdf Support What's a Creel? on Patreon: www.patreon.com/whatsacreel FaceBook: facebook.co...
Is this New Quadratic Formula Actually Faster than the OG Quadratic Formula? (For a Computer)
Переглядів 94 тис.Рік тому
In this video we look at how well Po-Shen Loh's new quadratic formula compares to the original, tried-and-true Quadratic Formula in terms of speed. The new formula from Po-Shen Loh certainly looks simpler, but which is faster for a computer? Po-Shen Loh's explanation of his formula: ua-cam.com/video/XKBX0r3J-9Y/v-deo.html Support What's a Creel? on Patreon: www.patreon.com/whatsacreel FaceBook:...
Answering Basic Assembly Language Questions - Assembly Language for Beginners
Переглядів 13 тис.Рік тому
In this video we answer several basic questions regarding x86/64 Assembly Language programming. The language has a steep learning curve, but once the fundamentals are understood, the whole journey becomes an exploration of the capabilities of a modern CPU. I have tried to keep things fairly simple, but even the basics in Assembly can be fiddly and difficult without clear step-by-step explanatio...
Object Oriented Programming is a Dirty Rotten Low Down Trick: A Look at How C++ Works
Переглядів 171 тис.Рік тому
In this video we explore some of the techniques used by compiler authors achieve the mechanisms of Object Oriented languages. It is interesting to see how close C is to C, and how simple these mechanisms truly are under the hood. Although the video concentrates on C , similar techniques are employed by the Java Virtual Machine, the .Net Virtual Machine in C#, and many other OO languages. 0:00 -...
That unbelievable function that can compute EVERYTHING! An Adventure in Discrete Mathematics
Переглядів 107 тис.2 роки тому
Well, this is a video all about 0's and 1's. Rather a lot of them really. It's about universal operations and exploring how very simple sets of operations can be used to theoretically compute anything at all. Addendum: I mention in the video that the NAND gates required for a video game or operating system would be comparable to Graham's Number. I am wrong, the number of NAND's required is faaa...
Bit Hacks from Beginner to Advanced - 11 Amazing Bit Twiddling Techniques
Переглядів 95 тис.2 роки тому
Support What's a Creel? on Patreon: www.patreon.com/whatsacreel FaceBook: whatsacreel/ Official Store: whats-a-creel-3.creator-spring.com In this video we explore 11 bit hacks from beginner to advanced beautifully rendered in 3D and to the music of Chopin. 0:00 - Intro 1:03 - Set a bit 1:53 - Clear a bit 2:45 - Toggle a bit 3:38 - Convert trailing 0's to 1 4:33 - Extracting the lea...
PIC Microcontroller Programming - PIC AS Assembler using MPLAB X IDE, Blinking LED
Переглядів 83 тис.2 роки тому
Support What's a Creel? on Patreon: www.patreon.com/whatsacreel Office merch store: whats-a-creel-3.creator-spring.com FaceBook: whatsacreel/ This video is a little crash course on how to program a PIC microcontroller. I am using the PIC AS assembler, which is the newer version of the Microchip Assembler, and I will be programming using a PIC 12F675, though you can probably follow ...
Computer Science Lockdown Quiz 2
Переглядів 6 тис.2 роки тому
Support What's a Creel? on Patreon: www.patreon.com/whatsacreel Office merch store: whats-a-creel-3.creator-spring.com FaceBook: whatsacreel/ Welcome to the (almost) Annual Computer Science Lockdown Quiz 2! This is a quiz about all things computer related! Good luck all, I hope you do well :) Big thank you to Sam and Julzy for their awesome hospitality :) !!! SPOILERS BELOW !!! Med...
Adventures in Hyperthreading - now with STEREO SOUND!!!
Переглядів 11 тис.2 роки тому
Support What's a Creel? on Patreon: www.patreon.com/whatsacreel Office merch store: whats-a-creel-3.creator-spring.com FaceBook: whatsacreel/ Re-upload with fixed audio! Thanks for letting me know all :) This video is in response to a question from a viewer. We explore hyperthreading and see how we can get the most out of it within our apps. Thanks all, have a good one :) Music: Mo...
Top 10 Craziest Assembly Language Instructions
Переглядів 455 тис.3 роки тому
Support What's a Creel? on Patreon: www.patreon.com/whatsacreel Office merch store: whats-a-creel-3.creator-spring.com FaceBook: whatsacreel/ In this video we’ll look at some of the most complex instructions available in x86/64 Assembly language. I have checked against the manuals from Intel and AMD and results from hardware, but it is almost impossible to create a video without an...
How do Spell Checkers work? Levenshtein Edit Distance
Переглядів 28 тис.3 роки тому
Support What's a Creel? on Patreon: www.patreon.com/whatsacreel Office merch store: whats-a-creel-3.creator-spring.com FaceBook: whatsacreel/ This video is all about an interesting algorithm commonly used in spell-checkers. It is called the Levenshtein Edit Distance algorithm and it determines the distance between two strings of symbols in terms of how many edits would be required ...
Assembly Language Misconceptions
Переглядів 104 тис.3 роки тому
Support What's a Creel? on Patreon: www.patreon.com/whatsacreel Office merch store: whats-a-creel-3.creator-spring.com FaceBook: whatsacreel/ In this video we look at some misconceptions about Assembly language. Apologies for the sound in this one (and possibly the next too!), the main audio was not usable so I have used the camera mic instead. Instruction listings by Agner Fog: ww...
AVX512 (3 of 3): Deep Dive into AVX512 Mechanisms
Переглядів 15 тис.3 роки тому
Support What's a Creel? on Patreon: www.patreon.com/whatsacreel Office merch store: whats-a-creel-3.creator-spring.com FaceBook: whatsacreel/ In this video we will explore the AVX 512 mechanisms. Links: AVX512 Wikipedia Article: en.wikipedia.org/wiki/AVX-512 IntelSpecifications and Programmer’s References: software.intel.com/content/www/us/en/develop/articles/intel-sdm.html CPUID W...
AVX512 (2 of 3): Programming AVX512 in 3 Different Ways
Переглядів 19 тис.3 роки тому
Support What's a Creel? on Patreon: www.patreon.com/whatsacreel Office merch store: whats-a-creel-3.creator-spring.com FaceBook: whatsacreel/ In this video, we will run through 3 different ways to implement AVX512 in your C projects. Agner Fog's VCL, Compiler Intrinsics, and native Assembly language. The information in this video has all been covered in previous videos, but I wante...
AVX512 (1 of 3): Introduction and Overview
Переглядів 39 тис.3 роки тому
AVX512 (1 of 3): Introduction and Overview
Why is Radix Sort so Fast? Part 3 Comparison and Code, Radix Sort vs QuickSort
Переглядів 84 тис.3 роки тому
Why is Radix Sort so Fast? Part 3 Comparison and Code, Radix Sort vs QuickSort
Why is Radix Sort so Fast? Part 2 Radix Sort
Переглядів 352 тис.3 роки тому
Why is Radix Sort so Fast? Part 2 Radix Sort
Why is Radix Sort so Fast? Part 1 Why are Comparison Sorts so Slow?
Переглядів 177 тис.3 роки тому
Why is Radix Sort so Fast? Part 1 Why are Comparison Sorts so Slow?
Modern x64 Assembly 16: Basic SIMD Floating Point Arithmetic
Переглядів 17 тис.3 роки тому
Modern x64 Assembly 16: Basic SIMD Floating Point Arithmetic
Introduction to Function Pointers in C++: What are they and how are they used?
Переглядів 33 тис.3 роки тому
Introduction to Function Pointers in C : What are they and how are they used?
Branchless Programming: Why "If" is Sloowww... and what we can do about it!
Переглядів 1,4 млн3 роки тому
Branchless Programming: Why "If" is Sloowww... and what we can do about it!
Computer Science Lockdown Quiz
Переглядів 14 тис.3 роки тому
Computer Science Lockdown Quiz
Set Associative Caches 2: AMD vs Intel Cache Commentary
Переглядів 12 тис.3 роки тому
Set Associative Caches 2: AMD vs Intel Cache Commentary
Set Associative Caches 1: What is a Set Associative Cache?
Переглядів 51 тис.3 роки тому
Set Associative Caches 1: What is a Set Associative Cache?
Agner Fog's VCL 2: Performance Programming using Vector Class Library
Переглядів 6 тис.4 роки тому
Agner Fog's VCL 2: Performance Programming using Vector Class Library
Introduction to Quantum Computing
Переглядів 32 тис.4 роки тому
Introduction to Quantum Computing
Modern x64 Assembly 15: Introduction to SIMD
Переглядів 24 тис.4 роки тому
Modern x64 Assembly 15: Introduction to SIMD
Exploring Cliques and Clique Problems
Переглядів 7 тис.4 роки тому
Exploring Cliques and Clique Problems
ASM Tricks Bonus Vid: C++ Calling Member Methods
Переглядів 8 тис.4 роки тому
ASM Tricks Bonus Vid: C Calling Member Methods

КОМЕНТАРІ

  • @electrolyteorb
    @electrolyteorb День тому

    These videos are JUST PURE GOLD

  • @waynegnarlie1
    @waynegnarlie1 День тому

    For those unable to see their own named general purpose register names (labels) in watches and variables, do this: Click the toolbox (Project Properties) icon from the Dashboard (extreme upper left icon), then select 'mpasm (Global Options)' and check the box for 'build in absolute mode', apply and exit. Then debug. It's taken me a couple of years to getting around to finding this fix, I have searched countless Microchip forums and watched as many YT videos to no avail. Hope this helps you.

  • @churchboy2334
    @churchboy2334 3 дні тому

    where is the source code. please push it to your github repository

  • @RDMCzz
    @RDMCzz 4 дні тому

    Thank you for the video! Is your website still active? I can't find it anywhere.

  • @contrazzed3651
    @contrazzed3651 5 днів тому

    Compilers HATE This One Simple Trick...

  • @tahacaliskanileenbasitseki4356
    @tahacaliskanileenbasitseki4356 5 днів тому

    thank you so much from Turkey

  • @leythecg
    @leythecg 5 днів тому

    absolutely fantastic in content and presentation! Many thanks!

  • @GMHarpov
    @GMHarpov 5 днів тому

    great piano.

  • @bravosierra2010
    @bravosierra2010 7 днів тому

    Nice!

  • @rstewart2702
    @rstewart2702 11 днів тому

    Hmmm. Well, I guessed correctly about Dekker, and would not have had to asked my earlier question if I had bothered to watch the whole thing before asking my earlier question. He was indeed Dijkstra’s colleague, another one of those early titans of computing science…

  • @rstewart2702
    @rstewart2702 11 днів тому

    Sorry I’m so late to the party! Just discovered your marvelous AVX512 introduction. Is TJ Dekker the same Dekker who derived the correct mutual exclusion algorithm at the Dutch Mathematical Center in the 1950’s, when EW Dijkstra was building the THE operating system?

  • @codingphysics695
    @codingphysics695 12 днів тому

    Another way to generate the Fibonacci numbers using XOR assignment for swapping the variables: for(int i = 0, j = 1; ; j^=i^=j^=i+=j );

  • @jonathandufour8621
    @jonathandufour8621 12 днів тому

    In your example at 11:48, you better should put the "NotLowerCase" label 1 line down to not make a useless "mov"

  • @saultube44
    @saultube44 12 днів тому

    Milliseconds -> ms /sarcasm

  • @fifaham
    @fifaham 14 днів тому

    Excellent video - thank you.

  • @hawkbirdtree3660
    @hawkbirdtree3660 15 днів тому

    I tried this example of SOA when loading 50 large textures, on my game written in C.The rest of the variables were primitives, and were initialized first. It was so fast! But I found that the loading speed was increased dramatically if I loaded the textures first. I’m talking about 5 seconds to load, to under 1 sec. I learned that positioning of variable initialization is important too 😂 It also makes the code so much easier to read.❤

  • @Kyojin743
    @Kyojin743 22 дні тому

    I’m an undergraduate in CpE and I was working on an autonomous robot, and I had this really over engineered way to do course correction. I watched this video, and just today I was looking over my system and noticed that the techniques in your video were perfect for this application. I reduced it from a 50 line solution of ugly nested if else’s about 4 deep at max, to 2 lines. Thank you!

  • @robert.ehrlich8942
    @robert.ehrlich8942 26 днів тому

    The best way I know to do the branchless translation from lower case to uppercase is to use a 256 bytes translation table where every byte contains its offset from begining except those from offset 'a' to 'z' containing 'A' to 'Z', so the loop's body reduces to : d[i] = tbl[d[i]; Another thing when you try to minimise branches is to remember the "hack interval" : as long as a and b are known to be non negative integers, the condition a <= x && x <= b is equivalent to (unsigned)(x-a) <= (unsigned)(b-a). In the general case this will replace 2 branches by one, when used in a loop, in most of the cases a and b don't change in the loop, so the compiler moves the calculation of (b-a) outside of the loop, here we have constants, so (b-a) is computed at compile time. Here, if we want to avoid the translation table, the body of the loop can reduce to : d[i] -= ((unsigned)(d[i] - 'a') <= (unsigned)('z' - 'a')) <<5; It should be easily vectorisable.

  • @another212shadow
    @another212shadow 28 днів тому

    okay series, but great fucking drawing. Your dad totally stold the show. The detail is incredible.

  • @timedebtor
    @timedebtor 28 днів тому

    I've actually never thought about branchless programming in the context of making a program faster. I only thought of it in the context of cryptographic systems where you want to ensure every execution has the same speed and heat profile or cryptographic systems which just don't allow for branching

  • @Oxxyjoe
    @Oxxyjoe 29 днів тому

    Your accent can be mistaken (by some American like myself) for Australian, and with those trees in the background, I just imagine what you're saying to be like "And we can see these Koala bears teaching their young some integer division using coconuts. Yep, and whenever a coconut rolls off of the tree branch, it sets the carry flag to one Or perhaps it IS Australian. I was like, he sounds British, in his earlier videos, but now I definitely hear something my brain identifies as Australian or similar.

  • @Bunnokazooie
    @Bunnokazooie Місяць тому

    Love when experts have a down-to-earth attitude like this. You rock man.

  • @coltersummers
    @coltersummers Місяць тому

    This added some much needed context to the content in my computer architecture class, thanks!

  • @ninjacat230
    @ninjacat230 Місяць тому

    this is why i prefer RISC

  • @juliansantos1900
    @juliansantos1900 Місяць тому

    Thays crazy 😧

  • @forheuristiclifeksh7836
    @forheuristiclifeksh7836 Місяць тому

    9:57

  • @forheuristiclifeksh7836
    @forheuristiclifeksh7836 Місяць тому

    5:59

  • @forheuristiclifeksh7836
    @forheuristiclifeksh7836 Місяць тому

    31:24

  • @forheuristiclifeksh7836
    @forheuristiclifeksh7836 Місяць тому

    0:12

  • @forheuristiclifeksh7836
    @forheuristiclifeksh7836 Місяць тому

    11:55

  • @forheuristiclifeksh7836
    @forheuristiclifeksh7836 Місяць тому

    1:44

  • @forheuristiclifeksh7836
    @forheuristiclifeksh7836 Місяць тому

    19:11

  • @forheuristiclifeksh7836
    @forheuristiclifeksh7836 Місяць тому

    1:04

  • @forheuristiclifeksh7836
    @forheuristiclifeksh7836 Місяць тому

    0:13

  • @heraldo623
    @heraldo623 Місяць тому

    Branchless machines are not Turing-complete.

  • @markt1964
    @markt1964 Місяць тому

    This is an awesome video series, thank you for it. However, how would you apply it to some of the newer ieee754 types, like _Decimal32, _Decimal64, and _Decimal128? I can see these being problematic for a couple of reasons. One, there is frequently more than one bit representation for the same number, particularly if the number of decimal digits is smaller than the maximum digits that can be represented in such a value, and two there are multiple standards for decimal floating point numbers.

  • @aaronvaldes3104
    @aaronvaldes3104 Місяць тому

    Awesome Thanks. I was able to code this with nasm, Debian12 and qemu. :)

  • @Aneureka
    @Aneureka Місяць тому

    Thanks for the intuitive and incredible tutorial about bank conflict!

  • @floppa9415
    @floppa9415 Місяць тому

    Crazy? The last one is more like crazy usefull and powerfull.

  • @zloidooraque0
    @zloidooraque0 Місяць тому

    saying that it is worth your time to get rid of what is factually BREAD AND BUTTER of whole programming -- conditional operators -- is insanity. overoptimisation is one of worst enemies. sure video is fun, but c'mon telling it is legit programming technique in a world with hardware and compilers of curerent time? madness on modern hardware (and by modern u mean 20-25 years) it's totally not worth wasting your own time to get into such witchcraft. also, say, converting upper to lower takes 0.005% of your program processor time, so you make your program not 20 times faster, but 0.01% faster. if it works. compiler knows better, always. and processors themselves know better. prediction, caching, parallel execution all this stuff. they were good in it 20 years ago, you can imagine how good they are now. such heavy optimizations are only worth it if your profiler shows you heavy peaks somewhere. but in this case 99% if time you are doing something really wrong and can fix it by refactoring abit.

  • @mikehill1114
    @mikehill1114 Місяць тому

    I know this is old, but I am vonfused about something... How is (a<b) not a comparison? Isnt it essentially: if a < b then return 1 else return 0?

  • @haroldmcbroom7807
    @haroldmcbroom7807 Місяць тому

    UA-cam keeps deleting my comments :(

  • @Billy-No-Mates-ol8nx
    @Billy-No-Mates-ol8nx 2 місяці тому

    In the 21st century, with efficient optimising compilers and high clock speeds, why muck about with assembler? Difficult to read, write and maintain!

    • @paradiselost9946
      @paradiselost9946 18 днів тому

      reverse engineering. redundancy. my biggest kick is running back through hex dumps of code compiled, see how its actually stored on the device. only one step away with opcodes from the raw data. try and figure out whats going on without documentation. can see ways to improve code, tighten it up. etch off a chip cap and theres no documentation. work out a program simply by the "fuses burnt". cant do that in higher level languages. engineers working on that 70 yr old voyager "asm" language are getting paid well... dead and buried yet still kicking... asm may seem clunky but imho, its nice to know how half and full bit adders work, what a shift register does, even the seemingly simple task of division or subtraction in binary can lead to a rabbit hole... higher level languages obscure things. sometimes theres no need for a chip with all the bells and whistles. sometimes theres the satisfaction of figuring out how to do something seemingly never attempted before...

  • @vetriligamvetrilingamnadar7171
    @vetriligamvetrilingamnadar7171 2 місяці тому

    Thanks 🎉🎉

  • @Alex-jb5tb
    @Alex-jb5tb 2 місяці тому

    I implemented your C procedures, but declaring the structures and doubles volatily to prevent GCC from optimising the code, multiplied 0.1 50 times to get ~1e-50 and compared it to a primitive multiplication (p *= 0.1). The error with DekkerMul is 2.8486703237279e-065, the one with the primitive approach is the slightly different margin 2.4925865332619e-065. What did I do wrong ? I summed up R.upper and R.lower before starting the next call to DekkerMul. Thank you.

  • @CheezePie
    @CheezePie 2 місяці тому

    Great video.. you earned a subscriber!

  • @nyahhbinghi
    @nyahhbinghi 2 місяці тому

    The fewer conditionals in a program, the better. But we get paid for conditionals. So be careful, human!

  • @peterSobieraj
    @peterSobieraj 2 місяці тому

    Don't make global libs directory. I did it once, and regreded it. It seem like good idea untill you install new version of some lib, and later you notice that some of your projects don't compile. Just put all required libraries into your project directory.

  • @redchief94
    @redchief94 2 місяці тому

    Holy crap I understand why a segmentation fault is called a segmentation fault now. Thank you.

  • @JIM6167
    @JIM6167 2 місяці тому

    How did you design the roulette spin function? Did you program it to account for RED BLACK Odd Even 1-18 19-36? What if the players change what they are betting on each spin? This program is not accurate for predicting an actual roulette betting session. Random numbers don't account for how the roulette wheel numbers are actually on the wheel and plus the randomness of ball bouncing around and changing directions.