Abusing Vector Search for Texts, Maps, and Chess 鈾燂笍

Vector Search is hot! Everyone is pouring resources into a seemingly new and AI-related topic. But are there any non-AI-related use cases? Are there features you want from your vector search engine, but are too afraid to ask? Last week was 馃敟 for vector search. Weaviate raised $50M, and Pinecone raised $100M... That's a lot and makes you believe that vector search is hard. But it's not. I have spent the last few days implementing a single-file vector search engine....

May 9, 2023 路 10 min 路 2077 words 路 Ashot Vardanian

How Junior and Senior C++ Devs Locate Unique Strings

Some of the most common questions in programming interviews are about strings - reversing them, splitting, joining, counting, etc. These days, having to interview more and more developers across the whole spectrum, we see how vastly the solutions, even to the most straightforward problems, differ depending on experience. Let鈥檚 imagine a test with the following constraints: You must find the first occurrence of every unique string in a non-empty array. You are only allowed to use the standard library, no other dependencies....

May 9, 2023 路 8 min 路 1641 words 路 Ashot Vardanian

We went through life with a smile 馃挃

We went through life with a smile. Now I am smiling through tears, alone. Yesterday was the memorial service. One week ago, I didn鈥檛 know what that meant. Yesterday I was sitting next to a coffin with the love of my life and our daughter in it. Today I must share their story. Sona There was a girl no one knew. Some have seen her, and some talked to her. Some were friends, and some were relatives, but she was so much more than anyone could have imagined....

April 29, 2022 路 15 min 路 3031 words 路 Ashot Vardanian

Mastering C++ with Google Benchmark 鈴憋笍

Very few consider C++ attractive, and hardly anyone thinks it鈥檚 easy. Choosing it for a project generally means you care about the performance of your code. And rightly so! Today machines can process hundreds of Gigabytes per second, and we, as developers, should all learn to saturate those capabilities. So let鈥檚 look into a few simple code snippets and familiarize ourselves with Google Benchmark (GB) - the most famous library in the space....

March 4, 2022 路 12 min 路 2555 words 路 Ashot Vardanian

Failing to Reach DDR4 Bandwidth 馃殞

A bit of history. Not so long ago, we tried to use GPU acceleration from Python. We benchmarked NumPy vs CuPy in the most common number-crunching tasks. We took the highest-end desktop CPU and the highest-end desktop GPU and put them to the test. The GPU, expectedly, won, but not just in Matrix Multiplications. Sorting arrays, finding medians, and even simple accumulation was vastly faster. So we implemented multiple algorithms for parallel reductions in C++ and CUDA, just to compare efficiency....

January 29, 2022 路 6 min 路 1215 words 路 Ashot Vardanian

Crushing CPUs with 879 GB/s Reductions in CUDA

GPU acceleration can be trivial for Python users. Follow CUDA installation steps carefully, replace import numpy as np with import cupy as np, and you will often get the 100x performance boosts without breaking a sweat. Every time you write magical one-liners, remember a systems engineer is making your dreams come true. A couple of years ago, when I was giving a talk on the breadth of GPGPU technologies, I published a repo....

January 28, 2022 路 10 min 路 1996 words 路 Ashot Vardanian

Apple to Apple Comparison: M1 Max vs Intel 馃崗

This will be a story about many things: about computers, about their (memory) speed limits, about very specific workloads that can push computers to those limits and the subtle differences in Hash-Tables (HT) designs. But before we get in, here is a glimpse of what we are about to see. A friendly warning, the following article contains many technical terms and is intended for somewhat technical and hopefully curious readers....

December 21, 2021 路 8 min 路 1618 words 路 Ashot Vardanian

Hyperscaler Shopping List: 2022 Data Center Tech Frenzy 鈽侊笍

A single software company can spend over 馃挷10 Billion/year, on data centres, but not every year is the same. When all stars align, we see bursts of new technologies reaching the market simultaneously, thus restarting the purchasing super-cycle. 2022 will be just that, so let鈥檚 jump a couple of quarters ahead and see what鈥檚 on the shopping list of your favorite hyperscaler! Friendly warning: this article is full of technical terms and jargon, so it may be hard to read if you don鈥檛 write code or haven鈥檛 assembled computers before....

December 7, 2021 路 15 min 路 3003 words 路 Ashot Vardanian

Only 1% of Software Benefits from SIMD Instructions

David Patterson had recently mentioned that (rephrasing): The programmers may benefit from using complex instruction sets directly, but it is increasingly challenging for compilers to automatically generate them in the right spots. In the last 3-4 years I gave a bunch of talks on the intricacies of SIMD programming, highlighting the divergence in hardware and software design in the past ten years. Chips are becoming bigger and more complicated to add more functionality, but the general-purpose compilers like GCC, LLVM, MSVC and ICC cannot keep up with the pace....

November 21, 2021 路 7 min 路 1406 words 路 Ashot Vardanian

Artsakh Must Be Independent 馃椇锔

A full-scale war started between Armenia, Azerbaijan and Turkey on September 27th, 2020. The disputed region of Artsakh or 鈥淣agorno-Karabakh鈥 hasn鈥檛 seen such escalation in over two decades. It is an ethnic conflict, that has a religious taste and an almost perpetual political engine keeping it up. It started as an attempt to redistribute power between different nations of the region, but today is used by local dictators to create an illusion of an external enemy....

October 2, 2020 路 8 min 路 1588 words 路 Ashot Vardanian

The 7 Sins of Turkish Autocracy 馃嚬馃嚪

While the world is too busy fighting COVID, reassembling the economy and preparing for the most turbulent elections in a century, one man certainly had been using that volatility to push his agenda further. As they say, never underestimate the man with the plan. And Tayyip Erdogan certainly has one. A plan that we must all counteract! Disclaimers. The Middle East is one of the most disputed regions in the world....

October 1, 2020 路 9 min 路 1771 words 路 Ashot Vardanian

Armenia, Azerbaijan, Turkey. Who's the Aggressor? 鈿旓笍

On September 27, 2020, Azerbaijan attacked civilian populations of Armenia and Artsakh. Recep Erdo臒an of Turkey reacted by calling 鈥淎rmenia the biggest threat to peace in the region鈥. Please, look at the numbers below and decide for yourself. Armenia Azerbaijan Turkey Population 3 Million 10 Million 82 Million Leader Nikol Pashinyan since 2018 Ilham Aliyev since 2003 (after father) Recep Erdo臒an since 2003 GDP 12 Billion $ 47 Billion $ 771 Billion $ Military Budget 0....

September 27, 2020 路 2 min 路 295 words 路 Ashot Vardanian

Come to Armenia 馃嚘馃嚥

Borders are closed, people are sitting at home, but I bet most of you dream about traveling again. I want to invite you all to my country of origin - Armenia. It has something to offer to every group of people - tourists, entrepreneurs and investors! ...

August 1, 2020 路 8 min 路 1680 words 路 Ashot Vardanian

Positive Outlook on the COVID-19 Crisis 馃樂

The bad news is coming from every direction. Still, I believe there are enough reasons to stay positive and excited about the future! Absurdly, this positive outlook was caused by 2 seemingly negative factors: Since the age of 15, I was convinced that the human race would likely face extinction in the 21st century. I was pretty confident that the threat would come in the form of virus, most likely from China....

March 22, 2020 路 12 min 路 2500 words 路 Ashot Vardanian