Most voted "optimizing" questions
In programming, optimization typically takes the form of increasing the speed of an algorithm, or reducing the resources it needs.
Learn more…134 questions
Sort by count of
-
0
votes1
answer176
viewsIt is better to use common division or Shift and Soma operations on 8bit microcontrollers
Considering programming for 8bit microcontrollers, we know that even for this microcontroller, the compilers have reached a unique level of optimization that allows us to program focused only on the…
-
0
votes0
answers77
viewsFlow at minimum cost
How do I find the minimum cost flow in a graph whose arcs have a lower and higher limit to the flow and a cost per unit of flow? Note: Do not use linear programming. Initially there is no viable…
-
0
votes2
answers1141
viewsPostgresql - Query data from a range and bring a boundary of lines but spaced
Good morning Guys, all right? I have a performance problem in a system and need to solve by customizing an SQL. Let us imagine the following scenario: - A table with millions of records, each record…
-
0
votes1
answer180
viewsSlow matplotlib (Python) to plot a 2-D graph?
Lately I came up with the need to use Python for plotting graphics with more than 3600 coordinates, but I realized that time can be a problem, but I’m not sure if the code I did has any performance…
-
0
votes2
answers1283
viewsHow to exchange values of two variables without using a third one in php
My question is very objective. I need to exchange values of two variables without using a third one in php. NOTE: Using array/array is not an option. Researching I found a solution in linguagem c…
-
0
votes1
answer544
viewsHow to optimize a select within an update?
I created a stored-Procedure which updates the Drive table balances. At first I tried to use From Movimentacao within the update of the drive, only that returned error. I fixed this problem by…
-
0
votes1
answer50
viewsHow could I optimize this PHP JS code?
I have this code in PHP and JS that searches in BD the visits that the site X received in the current month and plays on a chart of Google Charts. Despite being functional and serving me well until…
-
0
votes1
answer367
viewsOptimization Inserts Hibernate when there is relationship @Manytomany
Imagine the relationships: User has Many Permissions Permission has Many Users We can create a relationship of N para N as follows: User class. public class User { /*Many attributes here*/ private…
-
0
votes1
answer134
viewsSyntax problem when compiling modeling in Lingo
I’m trying to solve the modeling of a linear programming exercise in Lingo and every time I have the software compile the code I get the error code: 11. INVALID INPUT. SYNTAX ERROR HAS OCCURRED.…
-
0
votes0
answers42
viewsSearch in text GIANT
I have here with me, a giant text, AMAZING, is a txt of approximately 30 GIGABYTES, it is compressed in 7z I want to ask for your help, to know how I can do research within it, like a cat | grep,…
-
0
votes1
answer274
viewsSite Optimization - Take advantage of browser caching
I am optimizing my site in Google Pagespeed Tools. An item I have no idea what to do. There it is: Take advantage of browser cache Setting an expiration date or maximum age in HTTP headers for…
-
0
votes1
answer233
viewsOrganize array
Good how I can organize this array without using a loop Original array ["Entrada" => 4, "Prato principal" => 1] Desired array [["Entrada",4],["Prato principal",1]] ok I understood what you…
-
0
votes0
answers65
viewsHow to process data without the kernel dying?
I want to process the data into one unsupervised.py notebook. However, every time I start, my computer almost freezes and it looks like the kernel dies. It seems to be generated because of a memory…
-
0
votes1
answer223
viewsGenetic Algorithm Optimization - Node.Js
I’m transcribing a Java genetics algorithm for Javascript (Node.Js), but I’m having memory and optimization problems. Context of the problem: it’s an algorithm that the company I work for is trying…
-
0
votes1
answer209
viewsReduce Runtime Python3
I’m solving a challenge here, which is to basically see how many elements of a list fit into ALL ranges of an array. And my solution was this: def countSignals(frequencies, filterRanges): corretos =…
-
0
votes2
answers64
viewsHow to create some kind of "dynamic index" in the database
I have a table with 10000 records, but here I will represent with only 10 of them. +-------+---------+------------------+ | index | posicao | nome | +-------+---------+------------------+ | 1 | 0 |…
-
0
votes2
answers104
viewsConvert a Query with a Subquery to a Query with a Join
I’m trying to optimize a Query that the system I’m working on makes it have a SubQuery inside, only this SubQuery is referencing another table that has relation to the main table and by what I’ve…
-
0
votes1
answer99
viewsHow to improve the time cost of the algorithm - Python
Good night, you guys! I have the following problem in this algorithm, its cost is still high and I would like to know if there is a way to improve its cost even more, because this is a matter of…
-
0
votes1
answer51
viewsWhat is the significance of the mutation rate in genetic algorithms?
Hello. Let’s say I set a mutation rate of 5% in an AG. What does that mean? What is it about the entire population, and for every individual, I’m going to go through all of his genes, and I make a…
-
0
votes1
answer67
viewsHow to display different scope subplots in the same figure?
1 - Summary of the problem I’m trying to implement the Binary Backpack Problem, using Python and a simple genetic algorithm. Follows the repository on Github. I wrote functions for plotting the…
-
0
votes0
answers43
viewsMysql optimize Query
SELECT data_envio, nota_fiscal, nome_cliente, modelo.nome, conteudo.quantidade FROM conteudo, equipamento, caixa, pedido, cliente, modelo WHERE pedido.numero_pedido = conteudo.numero_pedido AND…
-
0
votes1
answer44
viewsHow to use Bezier curves to describe 3d animation in c++ efficiently?
I’m developing a 3d program in c/c++, I’ve done the rendering part of the objects, I’m missing the animation part, basically I want to use a list of values (frames) each containing the frame time,…
-
0
votes0
answers36
viewsIs it possible to see the "optimized" version of Javascript running from the browser?
I recently started to study compilers and learned that, in an intermediate phase of the whole process, there may be a number of parsing passages aimed at improving the performance of the code (in…
-
0
votes0
answers39
viewsIs there an implementation standard that better organizes classes of business rules?
I’m part of a Spring Boot development team and the project is getting bigger and bigger. Our problem is that even separating methods according to their related entity, the service classes become…
spring spring-boot spring-mvc pattern-design optimizingasked 3 years, 8 months ago Marcos Vinícius Carvalho 9 -
-1
votes1
answer212
viewsPDF Preview with jQuery
I need to display a PDF as if it were a magazine inside an HTML page. The idea is to optimize the visualization of a document that is very heavy (+100 pages). Currently I only have a link that opens…
-
-1
votes2
answers484
viewshow google sees dynamic pages
Hello friends a doubt of Noob, I develop websites in PHP. what happens, instead of having 50 pages one with each category I use a page with while. Well when you choose a category another page is…
-
-1
votes3
answers229
viewsPython is not so "smart" for redundant operations
Unlike many cases in c++, Python is apparently not so smart to optimize redundant operations, even between constants. I made a simple benchmark to test math.cos inside and outside a loop. In this…
-
-1
votes1
answer317
viewsUpload images "on demand"
On the site I’m developing has a "gallery carrosel" which is nothing more than a slider, where only an image will appear and has arrows for the user to navigate (passes alone the house 5s also)...…
-
-1
votes1
answer87
viewsCode takes time to execute, points error but then displays the result
Code on net Beans runs, but it takes time to show the result. Error appears in the netbeans console, but if I leave the program running after a while it shows the result: #include <stdio.h>…
-
-1
votes2
answers89
viewsCan you help me optimize this SQL query?
I am having a problem with this sql query. Its return time is on average 10 seconds and ta using 100% cpu. Probably because it uses many subquery. However I’m not able to optimize it. Does anyone…
-
-2
votes1
answer55
viewsCheck if a user has already activated their account by email, otherwise remind them to activate
I am developing a corporate network, and would like to check every time the user logged in, whether or not he activated his account through the token sent to your email. But I wouldn’t want that…
optimizingasked 8 years, 9 months ago Maicon Herverton 877 -
-2
votes1
answer46
viewsHow to scan the matrix using only one for?
The circumstances are in the code that works: String[][] compras = new String[][] { { "item 1", "1.70" }, { "item 2", "39.90" }, { "item 3", "9.90" }, { "item 4", "4.90" }, { "item 5", "7.90" } };…
-
-2
votes2
answers57
viewsHow to make two queries using the same Mysqlconnection?
I have the following code snippet: using(MySqlConnection conn = new MySqlConnection(conexao)){ try { string consulta = "SELECT * FROM tb_Cliente WHERE ID_Cliente IN ("+listaClientes+")";…
-
-3
votes0
answers26
viewsPython optimization
Is there any way to optimize the code below? I feel like I used many "Fors". texto = '' num = 10 for c in range(1, num): linha = '' for v in range(1, num - c): linha += ' ' linha += '/' for g in…