GCC 6.1 Compiler Optimization Level Benchmarks

In Effect of Optimizer in gcc on Intel/AMD and Power8 I measured speed ratios between optimized and non-optimized C code of three on Intel/AMD, and eight on Power8 (PowerPC) for integer calculations. For floating-point calculations the factors were two and three, respectively.

Michael Larabel in GCC 6.1 Compiler Optimization Level Benchmarks: -O0 To -Ofast + FLTO measured various optimization flags of the newest GCC.

For a Poisson solver the speed ratio between optimized and non-optimized code was five.

HimenoBenchmarkGCC61

Advertisements

Convert ASCII to Hex and vice versa in C and Excel VBA

In Downloading Binary Data, for example Boost C++ Library I already complained about some company policies regarding the transfer of binary data. If the openssl command is available on the receiving end, then things are pretty straightforard as the aforementioned link shows, in particular you then have Base64 encoding. If that is not the case but you have a C compiler, or at least Excel, then you can work around it.

C program ascii2hex.c converts from arbitrary data to hex, and vice versa. Excel VBA (Visual Basic for Applications) ascii2hex.xls converts from hex to arbitrary data.

To convert from arbitrary data to a hex representation

ascii2hex -h yourBinary outputInHex

Back from hex to ASCII:

ascii2hex -a inHex outputInBinary

Continue reading

No YouTube Videos on Google Chrome v50

After upgrading to Google Chrome version 50 I could hear sound in YouTube videos, but no images/video. At first I thought this was a matter just affecting me. Now I noticed that another machine which I upgraded to Google Chrome v50 also lost the ability to watch video in YouTube. This other machine had a different graphic setup, so the problem was not something related just to my graphic-card configuration. The same problem is true for Chromium. For some time I switched to Firefox, which does not suffer from this hitch.

Luckily I had yet another machine which still had a working Google Chrome v49 browser. I used the very handy fakepkg program written by Gordian Edenhofer to make an Arch package from this v49 installation, see also pacman/Tips and tricks and the bacman command. And voilà, I can now downgrade to a usable Google Chrome version, whenever there is a need:

pacman -U google-chrome-49.0.2623.112-1.pkg.tar.xz

I called

fakepkg google-chrome

which after two minutes generated google-chrome-49.0.2623.112-1.pkg.tar.xz. These two minutes are mostly due to compressing with xz.

Google Chrome is in AUR. I recommend to set

PKGDEST=/var/cache/aur

in /etc/makepkg.conf, so AUR packages are cached, very similar to the “normal” packages.

Use

pacaur -Syu --ignore google-chrome

to ignore updates for Google Chrome, or use IgnorePkg=google-chrome in /etc/pacman.conf, see Skip package from being upgraded.

See also Google Chrome Became a Performance Hog.

Update 04-Jun-2016: Chromium 51.0.2704.63 is fine again, i.e., it shows video.