Computers are very fast circuits able to do several basic logical, mathematical and memory operations and we use long sequences of these operations to perform almost every possible task. They are so fast that we think the elaboration as instantaneous, but if the input is large it may require some time. I still remember the… Continue reading Computational Models
Category: Programming
Obfuscation and IOCCC
In modern web programming languages an important concept is minimization of code, where the source code undergoes to a series of transformations (variables and functions are renamed, spaces and new lines removed and so on) in order reduce its size, compromising maintainability and readability in favor of space (and so speed of the download and… Continue reading Obfuscation and IOCCC
One million digits of Pi
Let continue the serie of computation of mathematical constants that we started with Euler Number. This time our target is π, the famous “3.14” ratio between circumference and diameter of a circle. Since out target is to compute one million digits in few minutes this post will use concept of code optimization. Like e, π… Continue reading One million digits of Pi
Computing 1 million digits of Euler’s Number
With this thread I start a new mathematical and computational branch: the art of computing decimals of particular mathematical constants. The first one will be e, the Euler’s number, about 2.7182818284, which is the base of exponential function ex, the only function equal to its derivative. Its inverse is the natural logarithm ln x, or… Continue reading Computing 1 million digits of Euler’s Number
3D Video Webcam
In nature vertebrates evolved mainly with two different typologies of eyes: Evolution found also other solutions to the problem of perceive depth (like the “radar” of baths), but since usually humans are equipped only with eyes and since I don’t want to make you undergo complex surgeries to test the content of the article, I… Continue reading 3D Video Webcam
Magento 2 csvfile profiler – one request per file
Built-in functionality Magento 2 provides built-in profilers to help developers to solve performance issues. You can enabling the profiler just launching: This sets a semaphore file var/profiler.flag with the chosen profiler type. There are two out-of-the-box profilers: The profiler can track also methods interesting for your development using the functions: One request per file Unfortunately… Continue reading Magento 2 csvfile profiler – one request per file
The game of life, ChatGPT version
Organic life is based on chemical reactions. Given a initial state of some compound we can try to guess how it will evolve emulating the interactions of molecules (think for example to proteins unfolding). Tha game of life is a mathematical model that wants to use this principle: an initial state and single rules to… Continue reading The game of life, ChatGPT version
A command line image reader
After some semi-serious posts about prime numbers and factorization, now it’s time to something lighter, related with the C ASCII webcam post. Hacking NASA… Suppose you are hacking NASA website using HTML. Obviously from the textual browser lynx since you are an hacker and you only use Linux terminal. Even better, in the order, you… Continue reading A command line image reader
C code optimization of Matrix Multiplication – Part 2
Welcome in the second part of this first journey in C code optimization (first because I hope to show also FFT). We started in this post with several optimization techniques applied to the Matrix Multiplication, in particular: The result was interesting, since in the graph we could see the impact of the various levels of… Continue reading C code optimization of Matrix Multiplication – Part 2
The Matrix Optimized: C code optimization of Matrix Multiplication – Part 1
I want to share an in depth experiment in code optimization the I did at least ten year ago during my PhD in high performance computing. I offer you to choice between two options: read this post or ignore this post. If you choose to skip this post your mind will stay safe, tomorrow you’ll… Continue reading The Matrix Optimized: C code optimization of Matrix Multiplication – Part 1