But are they enough to offset AI's booming energy demands?
Optimizing computer code to reduce energy use can provide huge benefits.

seen from Maldives

seen from Greece
seen from United States

seen from Russia

seen from Australia
seen from United States

seen from United States
seen from South Korea

seen from Japan
seen from United States
seen from China
seen from China

seen from United States

seen from United States

seen from Italy
seen from Norway

seen from United States
seen from China
seen from Germany
seen from Germany
But are they enough to offset AI's booming energy demands?
Optimizing computer code to reduce energy use can provide huge benefits.
Wish List For A Game Profiler
I want a profiler for game development. No existing profiler currently collects the data I need. No existing profiler displays it in the format I want. No existing profiler filters and aggregates profiling data for games specifically.
I want to know what makes my game lag. Sure, I also care about certain operations taking longer than usual, or about inefficient resource usage in the worker thread. The most important question that no current profiler answers is: In the frames that currently do lag, what is the critical path that makes them take too long? Which function should I optimise first to reduce lag the most?
I know that, with the right profiler, these questions could be answered automatically.
Hybrid Sampling Profiler
My dream profiler would be a hybrid sampling/instrumenting design. It would be a sampling profiler like Austin (https://github.com/P403n1x87/austin), but a handful of key functions would be instrumented in addition to the sampling: Displaying a new frame/waiting for vsync, reading inputs, draw calls to the GPU, spawning threads, opening files and sockets, and similar operations should always be tracked. Even if displaying a frame is not a heavy operation, it is still important to measure exactly when it happens, if not how long it takes. If a draw call returns right away, and the real work on the GPU begins immediately, it’s still useful to know when the GPU started working. Without knowing exactly when inputs are read, and when a frame is displayed, it is difficult to know if a frame is lagging. Especially when those operations are fast, they are likely to be missed by a sampling debugger.
Tracking Other Resources
It would be a good idea to collect CPU core utilisation, GPU utilisation, and memory allocation/usage as well. What does it mean when one thread spends all of its time in that function? Is it idling? Is it busy-waiting? Is it waiting for another thread? Which one?
It would also be nice to know if a thread is waiting for IO. This is probably a “heavy” operation and would slow the game down.
There are many different vendor-specific tools for GPU debugging, some old ones that worked well for OpenGL but are no longer developed, open-source tools that require source code changes in your game, and the newest ones directly from GPU manufacturers that only support DirectX 12 or Vulkan, but no OpenGL or graphics card that was built before 2018. It would probably be better to err on the side of collecting less data and supporting more hardware and graphics APIs.
The profiler should collect enough data to answer questions like: Why is my game lagging even though the CPU is utilised at 60% and the GPU is utilised at 30%? During that function call in the main thread, was the GPU doing something, and were the other cores idling?
Engine/Framework/Scripting Aware
The profiler knows which samples/stack frames are inside gameplay or engine code, native or interpreted code, project-specific or third-party code.
In my experience, it’s not particularly useful to know that the code spent 50% of the time in ceval.c, or 40% of the time in SDL_LowerBlit, but that’s the level of granularity provided by many profilers.
Instead, the profiler should record interpreted code, and allow the game to set a hint if the game is in turn interpreting code. For example, if there is a dialogue engine, that engine could set a global “interpreting dialogue” flag and a “current conversation file and line” variable based on source maps, and the profiler would record those, instead of stopping at the dialogue interpreter-loop function.
Of course, this feature requires some cooperation from the game engine or scripting language.
Catching Common Performance Mistakes
With a hybrid sampling/instrumenting profiler that knows about frames or game state update steps, it is possible to instrument many or most “heavy“ functions. Maybe this functionality should be turned off by default. If most “heavy functions“, for example “parsing a TTF file to create a font object“, are instrumented, the profiler can automatically highlight a mistake when the programmer loads a font from disk during every frame, a hundred frames in a row.
This would not be part of the sampling stage, but part of the visualisation/analysis stage.
Filtering for User Experience
If the profiler knows how long a frame takes, and how much time is spent waiting during each frame, we can safely disregard those frames that complete quickly, with some time to spare. The frames that concern us are those that lag, or those that are dropped. For example, imagine a game spends 30% of its CPU time on culling, and 10% on collision detection. You would think to optimise the culling. What if the collision detection takes 1 ms during most frames, culling always takes 8 ms, but whenever the player fires a bullet, the collision detection causes a lag spike. The time spent on culling is not the problem here.
This would probably not be part of the sampling stage, but part of the visualisation/analysis stage. Still, you could use this information to discard “fast enough“ frames and re-use the memory, and only focus on keeping profiling information from the worst cases.
Aggregating By Code Paths
This is easier when you don’t use an engine, but it can probably also be done if the profiler is “engine-aware”. It would require some per-engine custom code though. Instead of saying “The game spent 30% of the time doing vector addition“, or smarter “The game spent 10% of the frames that lagged most in the MobAIRebuildMesh function“, I want the game to distinguish between game states like “inventory menu“, “spell targeting (first person)“ or “switching to adjacent area“. If the game does not use a data-driven engine, but multiple hand-written game loops, these states can easily be distinguished (but perhaps not labelled) by comparing call stacks: Different states with different game loops call the code to update the screen from different places – and different code paths could have completely different performance characteristics, so it makes sense to evaluate them separately.
Because the hypothetical hybrid profiler instruments key functions, enough call stack information to distinguish different code paths is usually available, and the profiler might be able to automatically distinguish between the loading screen, the main menu, and the game world, without any need for the code to give hints to the profiler.
This could also help to keep the memory usage of the profiler down without discarding too much interesting information, by only keeping the 100 worst frames per code path. This way, the profiler can collect performance data on the gameplay without running out of RAM during the loading screen.
In a data-driven engine like Unity, I’d expect everything to happen all the time, on the same, well-optimised code path. But this is not a wish list for a Unity profiler. This is a wish list for a profiler for your own custom game engine, glue code, and dialogue trees.
All I need is a profiler that is a little smarter, that is aware of SDL, OpenGL, Vulkan, and YarnSpinner or Ink. Ideally, I would need somebody else to write it for me.
Using Cython to Optimize Python Code
Python is a popular and versatile programming language, but it can be slow compared to other languages like C or C++. This is where Cython comes in. Cython is a tool that allows you to write Python-like code, but compiles it to C, resulting in faster performance.
Cython is particularly useful for scientific and numerical computing, where performance is critical. It can be used to optimize existing Python code, or write new code in Cython for improved performance. In this article, we’ll take a look at how to use Cython and why it’s valuable for Python programmers to learn.
Getting started with Cython is easy. You can install it using pip, the Python package manager, by running the following command in your terminal:
Once you have Cython installed, you can start using it to optimize your Python code. The basic idea is to write your code in Cython, then compile it to C, which can then be imported and used in your Python code.
Here’s a simple example that demonstrates how to use Cython. Let’s say we have a Python function that calculates the sum of squares of numbers in a list:
We can optimize this function by writing it in Cython, then compiling it to C. Here’s the Cython version:
In this example, we’ve added a cdef statement to declare the variables as C data types, which results in faster performance. We can then compile this Cython code to C using the following command in our terminal:
This will generate a .c file that can be imported and used in your Python code.
Cython is a powerful tool that allows you to write Python-like code and optimize it for performance. Whether you’re working on scientific and numerical computing or just looking to improve the performance of your code, Cython is worth learning.
Some great resources for learning Cython include the official documentation, tutorials and example code on the Cython website, and the “Cython: A Guide for Python Programmers” book by Kurt Smith.
Here is the Cython Wiki:
The most widely used Python to C compiler. Contribute to cython/cython development by creating an account on GitHub.
As well as the ReadTheDocs for Cython:
There is also a great tutorial series on using Cython by Pythonist on Youtube
By using Cython, you can take your Python skills to the next level and achieve faster performance for your code. Give it a try and see the results for yourself!
How 2026 Bug Fixing & Monitoring Elevates Performance
⏱️ 4 minutes read · 719 words In the fast-paced world of software development, bug fixing and monitoring have become crucial activities in maintaining and enhancing the performance of applications. As technology evolves, so do the complexities involved in software systems, which makes a robust bug management strategy indispensable for developers. Let’s explore how the practices of bug fixing and…
Mastering Development Efficiency with Visual Studio 2022
Revolutionize Your Coding Journey with Cutting-Edge Tools
In the ever-evolving landscape of software development, staying ahead requires leveraging the latest tools that enhance productivity and foster innovation. Visual Studio Professional 2022 emerges as a game-changer, empowering developers to code faster and work smarter than ever before. This advanced IDE combines powerful features with intuitive design, making it an indispensable asset for both seasoned professionals and aspiring coders.
One of the standout features of Visual Studio 2022 is its enhanced performance. Built with a 64-bit architecture, it allows developers to handle larger projects seamlessly, reducing lag and increasing responsiveness. This performance boost translates into more efficient workflows, enabling teams to meet tight deadlines without sacrificing quality. Whether you're working on complex algorithms or large-scale applications, Visual Studio 2022 ensures your development environment is robust and reliable.
IntelliCode is another revolutionary feature that transforms the way developers write code. By leveraging AI-driven suggestions, it offers context-aware code completions, reducing the time spent on routine coding tasks. This intelligent assistance not only speeds up development but also promotes best practices, leading to cleaner, more maintainable codebases. Paired with features like code refactoring and debugging tools, IntelliCode elevates your coding efficiency to new heights.
Hot Reload is a must-have for modern developers aiming to iterate quickly. With this feature, changes made to the code are instantly reflected in running applications, eliminating the need for lengthy rebuilds. This rapid feedback loop accelerates development cycles and fosters a more experimental, creative approach to problem-solving. Whether you're tweaking UI elements or adjusting backend logic, Hot Reload keeps your workflow smooth and uninterrupted.
Furthermore, Visual Studio 2022 offers seamless integration with the .NET ecosystem, simplifying the development of web, desktop, and mobile applications. Its comprehensive set of tools streamlines testing, deployment, and version control, ensuring that every stage of your project is optimized for success. The IDE's customizable interface allows developers to tailor their workspace, enhancing focus and productivity.
Beyond technical features, Visual Studio Professional 2022 promotes a collaborative environment through integrated Git support and live sharing capabilities. Teams can work simultaneously on codebases, review changes, and resolve issues in real-time, fostering a culture of continuous improvement. This collaborative spirit is vital for modern development teams aiming to deliver high-quality software rapidly.
Embracing the future of development means adopting tools that adapt to your needs and inspire innovation. Code Faster, Work Smarter: The Future of Development with Visual Studio Professional 2022 offers a comprehensive suite of features designed to elevate your coding experience and achieve your project goals efficiently. By integrating intelligent assistance, performance enhancements, and collaborative tools, Visual Studio 2022 sets a new standard for professional development environments.
In conclusion, whether you're building cutting-edge applications or maintaining legacy systems, Visual Studio Professional 2022 provides the infrastructure to excel. Its forward-thinking features empower developers to push boundaries, innovate, and deliver exceptional software solutions. Embrace the future of development today and unlock your full potential with Visual Studio 2022.
Take Your Cloud Cost Optimization to the Next Level with Datametica’s Workload Optimization
As organizations migrate their data warehouses to the cloud, managing increasing cloud costs becomes a major challenge. Datametica’s cloud optimization services help tackle this issue by optimizing workloads for improved performance and reduced costs. By refining data models, code, and architecture, businesses can streamline operations, minimize resource usage, and achieve higher ROI.
Datametica’s approach to workload optimization includes:
Data Model Optimization: Reducing storage needs and improving query performance.
Code Optimization: Enhancing efficiency and reducing resource consumption.
Architecture Optimization: Removing bottlenecks and improving scalability.
By integrating FinOps principles, businesses can optimize their cloud spend, reduce wastage, and maximize the value of their cloud investments.
Fine-tune Drupal performance using XHProf profiling
Is your Drupal site running slow? Discover how XHProf profiling can help you pinpoint performance bottlenecks, optimize your code, and speed up your website.
With performance optimizations seemingly having lost their relevance in an era of ever-increasing ha...