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

Archive for the ‘C++’ Category

That new Carbon language, it has a net zero footprint, right?

Posted by jpluimers on 2022/08/25

No, Carbon is not the same thing as the same named MacOS Carbon API it .

Someone had to make it: [Wayback/Archive] Jeroen Wiert Pluimers on Twitter: “@d_feldman That has a net zero Carbon footprint, right? (OK, I’ll show myself out)”.

Luckily Googlers themselves are joking about it as well:

Read the rest of this entry »

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

Google MiraclePtr: a C++ smart pointer implementation

Posted by jpluimers on 2022/08/03

For my link archive:

It’s a smart pointer implementation by Google for C++, at the time of writing still experimental, but seems used in Google Chrome.

Via: [Wayback/Archive.is] Google dicht voor derde keer in maand tijd actief misbruikte lekken in Chrome – Computer – Nieuws – Tweakers

–jeroen

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

How isotopp became the online handle of Kristian K√∂hntopp

Posted by jpluimers on 2022/06/09

Like me, [Archive.is] Kristian Köhntopp is a nerd.

Unlike me, Kris bumped into character encoding issues for just about all his digital life. That started about the same time as mine, but again unlike me: he was way more involved in the technical aspects of it.

First a series of Tweets:

Read the rest of this entry »

Posted in ASCII, C++, Development, Encoding, EPS/PostScript, Font, ISO-8859, ISO8859, Power User, Software Development, Times New Roman | Leave a Comment »

Tesseract (software): amazing command-line OCR tool

Posted by jpluimers on 2022/05/13

A twitter post blasted me away by showing the results of Tesseract (software) – Wikipedia doing perfect OCR on an image from a twitter post:

Read the rest of this entry »

Posted in C++, Color (software development), Development, OCR, Power User, Software Development, Tesseract | 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 »

 
%d bloggers like this: