C++ is my favorite language that I'm not gonna abandon in near future. It gives full power to its developers and it's the only language that allowed me to do what I'm doing at the moment. I really need to control every allocation in my code and I often write special allocators for data structures I'm using. I'm currently interested mostly in high-performance computing, JIT code generation, and CPU accelerated rendering of 2D graphics.
- asmjit - A complete JIT and remote assembler for C++ language. It can generate native code for x86 and x64 architectures and supports the whole x86/x64 instruction set - from legacy MMX to the newest AVX2. It has a type-safe API that allows C++ compiler to do semantic checks at compile-time even before the assembled code is generated and executed.
- b2d [home] - Blend2D (b2d package) is a next generation 2D vector graphics engine written in C++. It has a built-in JIT compiler that can generate highly optimized and sophisticated 2D pipelines at runtime, which are much faster than static pipelines used in today's 2D engines. Dynamic pipeline construction is the main difference between Blend2D and other 2D engines, and guarantees the highest possible performance by taking advantage of CPU features detected at runtime. Blend2D provides also a deferred and asynchronous rendering, which makes it seamless to integrate with environments such as node.js and next generation UI toolkits that don't block while rendering their components.
- b2d-node [home] - A JS binding for Blend2D library built on top of njs (see below).
- broken - A minimalist unit testing framework for C++ which never allocates memory on the heap and doesn't use C++ exceptions. I designed this framework to be used in a continuous integration environment which uses valgrind for memory leak (and access) checks. The tool is used by asmjit and b2d at the moment.
- mathpresso - A C++ library designed to parse mathematical expressions and compile them into machine code. It's much faster than traditional AST or byte-code based evaluators, because there is basically no overhead in the expression's execution. The JIT compiler is based on asmjit and works on X86 and X64 architectures.
- mpsl - A shader language specification and implementation in C++ build on top of asmjit. The library was designed for b2d as an extension that brings a possibility to use 2D shaders in the engine, but made independent so it can be used by other projects. The idea is based on mathpresso, but the language was extended to support integer and floating point types, control flow, and functions. The project is much more complex than MathPresso.
- njs - Neutral JS (NJS) interface for C++ targeting multiple JS engines (only V8 atm) and environments (node.js vs V8-only). NJS was developed together with b2d-node as a result of many breaking changes in V8 engine that initially required many hours of refactoring. V8 is known for its breaking changes that did not only affect Chromium/Blink, but also many other projects, including node.js.
- cxxtool - A tool that I use to maintain my C++ projects.
fog - 2D vector graphics library with software rasterizer that I used to work on before Blend2D. The source code is still available, but it has not been updated for years and I don't plan to revive it. The main problem of Fog was its size - the library was so big and very difficult to finish in terms of man-years. Fog contains 2d vector graphics engine, a pixel effect engine, and an embedded SVG engine that is very memory efficient and will be ported to Blend2D at some point. I gained invaluable experience in 2D computer graphics and 2D pipeline construction during my work on Fog.
blitjit - My first attempt to create JIT pipeline. BlitJit pipeline was designed to be a pluggable compositing pipeline that can be used by 2D blitters and final rasterizer phases (sweeps). Many ideas I implemented in AsmJit came from working on BlitJit. Additionally, BlitJit helped me to understand and solve common issues related to 2D compositing pipeline construction, and as a result, I already knew how to design the pipeline in Blend2D.
- ppmagic - Preprocessor magic macros with continuous integration enabled. This is my playground for experimenting with C++ preprocessor. The main reason I created this project was incompatibility between GCC and MSVC preprocessors. MSVC preprocessor expands __VA_ARGS__ as a single token, which violates the C++ standard and causes some problems to code developed originally for standard compliant compilers.
- simdtests - Repository that contains SIMD implementation of functions used in 2D libraries:
- DePNG - Optimized PNG reverse filter implementation that takes advantage of SIMD. The most tricky part was optimizing the Paeth reverse filter, which is faster than the original libpng implementation even if it's kept in pure C. Additionally, the optimized implementation is about 5 times faster than a C implementation and makes the whole decoding process of PNG images faster about 20%.
- DeJPEG - Optimized JPEG dezigzag, and YCBCR to RGB conversion.
- RGB/HSV - Highly optimized RGB/HSV conversion that takes advantage of SIMD instruction and runs about twice as fast as a baseline C implementation. The code is very tricky and uses floating point arithmetic together with bit manipulation. It can process more than one pixel in parallel and is easy to extend for supporting wider instruction sets like AVX and AVX-512.
- PixOps - Pixel manipulation optimizations. Contains an experimental cross-fade blitter that takes advantage of
pmaddubsw instruction. Not much faster than a pure SSE2 implementation thought.
I prefer node.js environment for writing high-performance and highly scalable servers. My node.js work is often related to application's architectures, APIs, data, and security. Recently I also started experimenting with 2D game design and rendering.
- xpart - an extensible framework for building modular applications and parts with dependency management. It can be used to develop applications composing of multiple modules (parts) with a possibility to specify which modules to run. The framework itself defines a minimal interface that can be used to define modules, their dependencies, and a way how to start and stop them. It contains an interface for logging, module management, and application's lifetime management. The concept behind xpart is very different to the traditional 'web server is the app' approach used commonly in node apps.
- xql [fiddle] - SQL builder and utilities library for node.js (runs in browser as well). This library uses an expression tree to build SQL queries programmatically and it's one of the fastest libraries for building such queries for node.js, see xql-bench.
- webciv - a civ-like game implemented completely in JS. It's a work-in-progress project that demonstrates how to render a professional looking game-map that is composited from textures and blendmaps. The renderer uses a pure <canvas> to render everything, including terrain and coast transitions.