Home / Companies / Grafana Labs / Blog / Post Details
Content Deep Dive

Finding performance bottlenecks with Pyroscope and Alloy: An example using TON blockchain

Blog post from Grafana Labs

Post Details
Company
Date Published
Author
Anatoly Korniltsev
Word Count
1,406
Language
English
Hacker News Points
-
Summary

Continuous profiling with tools like Pyroscope and Alloy can significantly enhance performance optimization, as demonstrated by a case study involving the TON blockchain optimization contest. This contest challenged developers to improve a blockchain validation algorithm written in C++, with performance gains measured by execution time. Pyroscope engineers used Alloy's eBPF-based CPU profiler to analyze contestant submissions, identifying performance bottlenecks without altering the code. Notable optimizations included replacing standard cryptographic libraries with faster alternatives, using hash tables instead of ordered collections, and applying algorithmic improvements to reduce computation overhead. These changes yielded performance improvements ranging from 1.5% to 20%. The case study underscores the value of modern profiling tools in making performance optimization more accessible and highlights the potential for significant speedups through relatively straightforward code modifications.