answerstu

Julia functional performance confusion

I am new to Julia, and as my first stab at a mildly nontrivial program wrote the below, which computes the divisor sigma functions for all numbers in a range from 1 to N - the divisor sigma function sigma(k, n) computes the sum of kth powers of divisors of n (if k is 0, it is simply the number of divisors). Since sigma(k, n) is a multiplicative function of n, we write it as below (this, in principle, should be far more efficient than factoring each integer in our range):using Primesthefunc(i) = (a::Int, b::Int)-> sum(BigInt(a)^(k*i) for k in...Read more

performance - Is it useful to use VZEROUPPER if your program+libraries contain no SSE instructions?

I understand it's important to use VZEROUPPER when mixing SSE and AVX code but what if I only use AVX (and ordinary x86-64 code) without using any legacy SSE instructions?If I never use a single SSE instruction in my code, is there any performance reason why I would ever need to use VZEROUPPER?This is assuming I'm not calling into any external libraries (that might be using SSE)....Read more

Tatsu Parsing Performance

I've implemented a grammar in Tatsu for parsing a description of a quantum program Quipper ASCII (link). The parser works but is slow for the files I'm looking at (about 10kB-1MB size, see the resources directory). It takes approximately 10-30 seconds to parse some files. The grammar is very straightforward and it should be possible to parse these files fairly quickly. One thing I've tried is adding cuts wherever possible to make sure there is no unneeded backtracking. The grammar is specified as@@grammar :: Quipper@@whitespace :: /[^\S\n]*/# T...Read more

performance - Importing Jyson Jar into nGrinder

I'm trying to import the Jyson module to Grinder running on a remote machine. However, I see no clear guidance on how to accomplish this. Where does the jar file go? The Jyson zip I downloaded has a lib and src folder as well. I had read this link and understood what has to be added into the grinder.properties file, but where do the actual lib and src files go? If there is an already existing link that explains the same, please do link me to it.Thanks for the all help...Read more

opengl - Rendering Pipeline -- Performance -- Scaling with regard to amount of pixels

I had a discussion with a friend about two questions regarding the performance of the OpenGL Rendering Pipeline, and we would like to ask for help in determining who is right.I argued that the throughput scales linearly with the amount of pixels involved, and therefore rendering a 4k scene should take 4 times as long as rendering a 1080p scene. Then we discovered this resolution-fps comparison video [see 1], and the scaling does not seem to be linear. Could someone explain why this is the case?I argued that rendering a 1080p scene and rendering...Read more

performance - Are unwrap()s under patterns optimized away?

I have some code where I often use unwrap() under patterns, where I can be sure it won't panic. Some of those pieces are in performance-critical functions, so I was wondering if it would be a good idea to get rid of these unwrap()s in favor of unchecked variants of applicable functions. However, I didn't see any difference with #[bench] tests and the ASM for both variants looks pretty similar to me (though I'm not an expert).It appears that Rust is able to optimize such cases away; am I right or should I use unchecked functions instead of unwra...Read more

Excel List-Object VBA Performance Bug?

I have an issue with performance on an excel application which uses List Objects (AKA Excel Tables). I suspect it may be a bug, but despite my Googling I could not find any reference of it. I've already developed a workaround for my application, but what I’m interested in is if anyone can give any insight into why this happens.Note: I’m using Excel 2007 on Windows Vista. The setup is as follows: I have a spreadsheet which holds data in a List Object, with VBA code which can be kicked off via a command button; this code may make several edits to...Read more

Performance optimization strategies of last resort

There are plenty of performance questions on this site already, but it occurs to me that almost all are very problem-specific and fairly narrow. And almost all repeat the advice to avoid premature optimization.Let's assume:the code already is working correctlythe algorithms chosen are already optimal for the circumstances of the problemthe code has been measured, and the offending routines have been isolatedall attempts to optimize will also be measured to ensure they do not make matters worseWhat I am looking for here is strategies and tricks ...Read more

performance - Why JSF calls getters multiple times

Let's say I specify an outputText component like this:<h:outputText value="#{ManagedBean.someProperty}"/>If I print a log message when the getter for someProperty is called and load the page, it is trivial to notice that the getter is being called more than once per request (twice or three times is what happened in my case):DEBUG 2010-01-18 23:31:40,104 (ManagedBean.java:13) - Getting some propertyDEBUG 2010-01-18 23:31:40,104 (ManagedBean.java:13) - Getting some propertyIf the value of someProperty is expensive to calculate, this can pot...Read more

performance - Improving THREE js loading time

I'm new to webgl and three js but I managed to finished a small project in a few weeks. But what I want to ask is, what can I do do improve loading times of the app? I'm not complaining about the fps's because the interaction with it is smooth, but it takes quite a while to load everything. Do you guys have any tips or resources that I can check to improve the bundle js loading times?Im using d3, topojson and three js. The project is a 3d globe with a background image. The globe has a texture and it shows the overlay of the country you're hover...Read more

Julia (Julia-lang) Performance Compared to Fortran and Python

I adapted a simple program to compute and plot the movement vortices of to Julia to test the language, I also wrote it in Python for no particular reason.(Disclaimer: 1. Every performance comparison on stackoverflow I read gets slammed for not being comprehensive/correct/well written/relevant etc. etc. - I'm not pretending this is a real comparison, I would just like to know how to make the Julia quicker. 2. I know the python could be optimized, implemented in Cython etc, that's not part of this discussion, it's just here for a reference of equ...Read more