Category "performance"

How to reduce CPU usage for Java 11 with G1GC on GCP

I have: the application multi thread, low latency OpenJDK 64-Bit Server VM version 11.0.7+10 configuration is Xms=6g Xmx=12g machine is 12CPU started in GCP (Go

Android method performance suddnely slow after upgrade from Marshmallow to Nougat

I have been developing a game, using a Samsung Galaxy S6 running Marshmallow as one of my development devices. After the phone upgraded itself to Nougat, a met

Android method performance suddnely slow after upgrade from Marshmallow to Nougat

I have been developing a game, using a Samsung Galaxy S6 running Marshmallow as one of my development devices. After the phone upgraded itself to Nougat, a met

Fast real valued random generator in java

java.util.Random.nextDouble() is slow for me and I need something really fast. I did some google search and I've found only integers based fast random generat

Fast hash function with collision possibility near SHA-1

I'm using SHA-1 to detect duplicates in a program handling files. It is not required to be cryptographic strong and may be reversible. I found this list of fast

python read zipfile into numpy-array efficiently

I want to read a zipfile into memory and extract its content into a numpy array (as numpy-datatypes). This needs to happen in an extremely efficient/fast manner

Why is processing a sorted array faster than processing an unsorted array?

Here is a piece of C++ code that shows some very peculiar behavior. For some strange reason, sorting the data (before the timed region) miraculously makes the l

Google Tag manager impact in web performance (load time)

I´m trying to improve the load time and performance of my website. To summarize this is the average loading time stats that I get without including Google

How to improve the code to return the unpaired element

I am practising for an upcoming coding interview and here is one of my practice problems and my progress. How can I improve the program and what is your advice?

How to analyze golang memory?

I wrote a golang program, that uses 1.2GB of memory at runtime. Calling go tool pprof http://10.10.58.118:8601/debug/pprof/heap results in a dump with only 323

Best way to select random rows PostgreSQL

I want a random selection of rows in PostgreSQL, I tried this: select * from table where random() < 0.01; But some other recommend this: select * from table

Python string formatting: is '%' more efficient than 'format' function?

I wanted to compare different to build a string in Python from different variables: using + to concatenate (referred to as 'plus') using % using "".join(list) u

AAssetManager_openDir takes long to execute

I have a problem with AAssetManager_openDir method taking long to return. It is not affecting all devices, it looks like it is quite fast on ART devices (only m

Make copy-paste code, triggered by button at different locations, faster

I made a model for our project managers to follow the economy in different projects. A wish for the model was the option to add rows into the matrix I made with

Performance of built-in types : char vs short vs int vs. float vs. double

Seeing Alexandre C's reply in the other topic, I'm curious to know that if there is any performance difference with the built-in types: char vs short vs int vs

Javascript classes vs objects, pros and cons?

In my most recent javascript program (which is mostly for fun and proof-of-concept than anything else) I have a lot of different kinds of objects and of each ki

Does the <script> tag position in HTML affects performance of the webpage?

If the script tag is above or below the body in a HTML page, does it matter for the performance of a website? And what if used in between like this: <body&

Performance cost of 'new' in C#?

In C# what is the performance cost of using the new keyword? I ask specifically in relation to games development, I know in C++ it is a definite no-no to be new

What might cause a performance drop after migrating a WPF project from 3.5 to 4.0?

When I compile my application to target version 4.0 of the framework, UI performance goes straight to hell. For instance, opening an Expander that contains a G

Performance of foreach, array_map with lambda and array_map with static function

What's the performance difference (if there is any) between these three approaches, both used to transform an array to another array? Using foreach Using array