The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,947 other followers

Archive for the ‘Assembly Language’ Category

STM32 Simulator Early Access by Wikwi Makes: sign up through this Google docs form

Posted by jpluimers on 2022/08/18

If you like working with STM32 and want to try out a new simulator for it (by [Wayback/Archive] Wokwi (@WokwiMakes)), then sign up at
[Wayback/Archive] https://docs.google.com/forms/d/e/1FAIpQLSfpuGcUI1YdsX6o5lBhit14GPBEh6L7MVTSSDEk_HJFvBgjUQ/viewform

Via [Wayback/Archive] Wokwi on Twitter: “Want to try out the new STM32 simulator? Sign-up for early access: link.wokwi.com/stm32-simulator 🤓” and [Wayback/Archive] tnt (@tnt).

–jeroen

Read the rest of this entry »

Posted in ARM, ARM Cortex-M, Assembly Language, Development, Go (golang), Hardware Development, Software Development, STM32 | Leave a Comment »

When floating point code suddenly becomes orders magnitudes slower (via C++ – Why does changing 0.1f to 0 slow down performance by 10x? – Stack Overflow)

Posted by jpluimers on 2022/01/26

When working with converging algorithms, sometimes floating code can become very slow. That is: orders of magnitude slower than you would expect.

A very interesting answer to [Wayback] c++ – Why does changing 0.1f to 0 slow down performance by 10x? – Stack Overflow.

I’ve only quoted a few bits, read the full question and answer for more background information.

Welcome to the world of denormalized floating-point! They can wreak havoc on performance!!!

Denormal (or subnormal) numbers are kind of a hack to get some extra values very close to zero out of the floating point representation. Operations on denormalized floating-point can be tens to hundreds of times slower than on normalized floating-point. This is because many processors can’t handle them directly and must trap and resolve them using microcode.

If you print out the numbers after 10,000 iterations, you will see that they have converged to different values depending on whether 0 or 0.1 is used.

Basically, the convergence uses some values closer to zero than a normal floating point representation dan store, so a trick is used called “denormal numbers or denormalized numbers (now often called subnormal numbers)” as described in Denormal number – Wikipedia:

In a normal floating-point value, there are no leading zeros in the significand; rather, leading zeros are removed by adjusting the exponent (for example, the number 0.0123 would be written as 1.23 × 10−2). Denormal numbers are numbers where this representation would result in an exponent that is below the smallest representable exponent (the exponent usually having a limited range). Such numbers are represented using leading zeros in the significand.

Since a denormal number is a boundary case, many processors do not optimise for this.

–jeroen

Posted in .NET, Algorithms, ARM, Assembly Language, C, C#, C++, Delphi, Development, Software Development, x64, x86 | Leave a Comment »

Moore’s law has almost ended: back to the future

Posted by jpluimers on 2021/09/29

[WayBack] We’re approaching the limits of computer power – we need new programmers now | John Naughton | Opinion | The Guardian

Ever-faster processors led to bloated software, but physical limits may force a return to the concise code of the past

So back to optimisation and maybe even assembly language.

Which brings back the days gone by.

–jeroen

Read the rest of this entry »

Posted in Algorithms, Assembly Language, Development, Software Development | Leave a Comment »

A Tale of Many Divisions – Naive Prime Factorization Across a Handful of Architectures

Posted by jpluimers on 2020/06/16

[WayBack] A Tale of Many Divisions – Naive Prime Factorization Across a Handful of Architectures

Source code: [WayBack] GitHub – blu/euclid: An extremely naive prime factorizer

Via: [WayBack] Blu looks at how a small piece of code with divisions surprisingly behave on various architecture: #Arm, #MIPS, and #x86. – Jean-Luc Aufranc – Google+

–jeroen

Posted in Assembly Language, C++, Development, Software Development | Leave a Comment »

Insentricity :: Kermit on the JAIR 8080 ::

Posted by jpluimers on 2019/05/22

Cool: [WayBackInsentricity :: Kermit on the JAIR 8080 ::

Repository: [WayBackFozzTexx/Kermit-CPM: Columbia University’s Kermit for CP/M

–jeroen

Posted in Assembly Language, Development, History, Software Development | Leave a Comment »

 
%d bloggers like this: