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,856 other followers

Archive for the ‘ARM’ Category

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 »

Compiler Explorer – how various C++ compilers translate code into various machine code targets

Posted by jpluimers on 2017/01/03

The first implementation of Compiler ExplorerĀ supports many versions of the gcc, clang and icc compilers on ARM, ARM64, AVR and x86 targets.

On the left you type your C++ code, on the right you see the resulting assembler code optionally with byte code and colorised so you can correlateĀ the C++ lines with the assembly.

A great way to start the year: learning new things!

Related:

–jeroen

via:

Some videos:

Read the rest of this entry »

Posted in ARM, Assembly Language, C++, Conference Topics, Conferences, Development, Event, Software Development, x86 | Leave a Comment »

ARM-Based Windows 10 Portable PCs!? Hell Yes! – Thurrott.com

Posted by jpluimers on 2016/12/08

Windows 10 on ARM will supply a long-rumored feature: The ability to run 32-bit Win32/x86 desktop applicationsā€”Apple iTunes, Adobe Photoshop, Google Chrome, whateverā€”directly on the system, unchanged.

Wow, just wow.

[WayBack]Ā ARM-Based Windows 10 Portable PCs!? Hell Yes! – Thurrott.com

Via:

Posted in ARM, Assembly Language, Development, Power User, Windows, Windows 10 | Leave a Comment »

20 years ago today: Here’s a nickel kid. Go buy yourself a real computer.

Posted by jpluimers on 2015/06/24

An eternal Dilbert strip that is based on the tinyĀ Here’s a nickel kid. Go buy yourself a real computerĀ fragment from single.h:

#if _FP_W_TYPE_SIZE < 32
#error "Here's a nickel kid. Go buy yourself a real computer."
#endif

Read the rest of this entry »

Posted in *nix, ARM, Assembly Language, Delphi, Delphi 1, Development, Fun, Geeky, History, MS-DOS, Power User, Software Development, Windows, Windows 8.1, Windows 95, Windows NT, x86 | 2 Comments »

Understanding ARM Assembly Part 1 – Ntdebugging Blog – Site Home – MSDN Blogs

Posted by jpluimers on 2013/12/23

Another interesting series that just started:Ā Understanding ARM Assembly Part 1 – Ntdebugging Blog – Site Home – MSDN Blogs.

–jeroen

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

 
%d bloggers like this: