Quick padding of a string in Delphi

I was trying to speed up a certain routine in an application, and my profiler, AQTime, identified one method in particular as a bottleneck. The method has been with us for years, and is part of a...

Android: Filtering a SimpleCursorAdapter ListView

Right now, I'm running into issues trying to implement a FilterQueryProvider in my custom SimpleCursorAdapter, since I'm unsure of what to do in the FilterQueryProvider's runQuery function. In...

RAMdisk slower than disk?

A python program I created is IO bounded. The majority of the time (over 90%) is spent in a single loop which repeats ~10,000 times. In this loop, ~100KB data is generated and written to a...

Combine Rotation Axis Vectors

I'm experimenting with using axis-angle vectors for rotations in my hobby game engine. This is a 3-component vector along the axis of rotation with a length of the rotation in radians. I like...

Fast way of counting non-zero bits in positive integer

I need a fast way to count the number of bits in an integer in python. My current solution is bin(n).count("1") but I am wondering if there is any faster way of doing this? PS: (i am...

Do any JVM's JIT compilers generate code that uses vectorized floating point instructions?

Let's say the bottleneck of my Java program really is some tight loops to compute a bunch of vector dot products. Yes I've profiled, yes it's the bottleneck, yes it's significant, yes that's just...

In node.js, how to declare a shared variable that can be initialized by master process and accessed by worker processes?

I want the following During startup, the master process loads a large table from file and saves it into a shared variable. The table has 9 columns and 12 million rows, 432MB in size. The worker...

Flying Saucer - ITextRenderer createPdf extremely slow

I am trying to generate PDF from Html using iText and Flying Saucer. I have used different techniques suggested on SO to enable DocumentBuilder parse quickly. However, ITextRenderer...

How can retrieve chain of certificates via openssl

I have to retrieve and download on my local environment certificate chain from remore server. I can do it using browser embedded services, but as far as I know this approach does not work for...

Why I cannot use python module concurrent.futures in class method?

I want to make my class method runs parallel, but it only produces some kind of error that I can not solve. My code is: import concurrent.futures as futures samples = ['asfd', 'zxcv', 'asf',...

Scaling and High Availability of Oracle Database

As per Oracle Docs we can use Oracle RAC for HA and scaling the database. I see that Oracle RAC uses shared persistence ( SAN based) to share the Data ( data files, control files of DB) among the...

SNIReadSyncOverAsync Performance issue

Recently I used dot Trace profiler to find the bottlenecks in my application. Suddenly, I have seen that in most of the places which are taking more time and more cpu usage to is...

Best way to improve UDP transfer speeds with Python?

I have written a Python program for sending and receiving large files over UDP. Right now, I can hit speeds of about .01GB/s when transferring between two computers on a 10 Gigabit Ethernet cable....

How are x86 uops scheduled, exactly?

Modern x86 CPUs break down the incoming instruction stream into micro-operations (uops1) and then schedule these uops out-of-order as their inputs become ready. While the basic idea is clear, I'd...

rsync compression and how it works

I am using rsync to backup a large amount of files (on a Ubuntu Linux server) to a cloud network service over WebDav. Because my network speed is my bottle-necking factor, I thought I would use...

How to handle file upload using sequelize + mysql + express js?

I'm developing a simple software college project that needs pdf/doc file upload. But here comes the bottleneck: I couldn't find anywhere an example and example of this feature using the Sequelize...

Scipy Optimizer or heuristic approach, which to choose for bottleneck capacity

I am not able to formulate the below problem into scipy's linprog or minimize due to complex constraint condition. So wanted to check if there are other modules that allow below format of block...

Google Colab is very slow compared to my PC

I've recently started to use Google Colab, and wanted to train my first Convolutional NN. I imported the images from my Google Drive thanks to the answer I got here. Then I pasted my code to...

Is it possible to accelerate clang-tidy using ccache or similar?

Since employing ccache on our CI server, we find that the bottleneck in terms of build time is now our static analysis pass, that uses clang-tidy, among other tools. Does anyone know of a way to...

How to draw lots of polygons quickly in pycairo?

I have a function which draws polygons into a pycairo context like so: def draw_polygon(context, polygon): context.move_to(*polygon[0]) for point in polygon: ...

Python: why do I get an error when I import geopandas?

I try to import geopandas in my jupyter notebook. import geopandas as gp and I get the following error: ImportError:...

WEBP support not installed error with Pillow included in Anaconda

I have written a small code to open webp image in the Anaconda prompt. from PIL import Image im = Image.open('test.webp') It causes the following...

Faster memory allocation and freeing algorithm than multiple Free List method

We allocate and free many memory blocks. We use Memory Heap. However, heap access is costly. For faster memory access allocation and freeing, we adopt a global Free List. As we make a...

"AssertionError: Torch not compiled with CUDA enabled" in spite upgrading to CUDA version

I figured out this is a popular question, but still I couldn't find a solution for that. I'm trying to run a simple repo Here which uses PyTorch. Although I just upgraded my Pytorch to the latest...

PowerShell steps to fix slow startup

I have slow PowerShell console startup times (always more than 5 second wait) and was hoping for advice on troubleshooting steps to find out where the bottlenecks might be? I have read that for...

Microservices communication: HTTP vs RPC

RPC standard was created keeping in mind distributed computed but in Today's Microservices world we hardly use RPC for communication between services rather HTTP is mostly used. I want to...

Reset all weights of Keras model

I would like to be able to reset the weights of my entire Keras model so that I do not have to compile it again. Compiling the model is currently the main bottleneck of my code. Here is an example...

Inter-Process Communication in dotnet 5/6

I am developing a new project in Blazor WebAssembly with .NET 5, this ASP.NET Core hosted service (server part of Blazor app) will need to talk to a .NET Framework 4.7.2 Windows Service. The...

Fast CAN communication using sockets in C++

I'm trying to use C/C++ to communicate with a CAN bus. I'm using sockets to read and write on the bus. I've created a write thread and a read thread. The read thread is constantly trying to read...