» Home » optimization » Page 1
Is the Empty Base Class Optimization now a mandatory optimization (at least for standard-layout classes)?
Category : Programming Languages

According to C++11 9.1/7 (draft n3376), a standard-layout class is a class that:



has no non-static data members of type non-standard-layout class (or array of such types) or reference,


has no virtual functions (10.3) and no virtual base classes (10.1),


has the same access control (Clause11) for all non-static data members,


has no n


View Replies


mongodb micro-optimization of batch inserts ? or is this an important optimization?
Category : Databases

premise : update statements are harmless since the driver by default works in one way messaging (as long as getLastError isn't used).


question Is the following fragment the best way to do this in mongodb for high volume inserts ? Is it possible to fold step 2 and 3 ?


edit : old buggy form , see below


// step 1 : making sure the top-level docum

View Replies


Risk-Parity Portfolio Optimization using Extreme Optimization in C#
Category : C & C++ & C#

I'm trying to create a risk-parity portfolio in C# using the Extreme Optimization routines.


I'm mostly trying them out to see if I like them or not before I buy them (I'm a student so money is tight).


My idea was to implement this new kind of portfolio optimization called risk-parity. It basically says that in order to diversify your portfolio you should give equal risk


View Replies


C++ optimization, using > instead of <=
Category : Programming Languages

Is it more expensive to check '<=' rather than '>' ?


The first one checks both < and ==, but '>' does just one check.


Or maybe the compiler optimizes this?


View Replies


Optimization! - What is it? How is it done?
Category : Development Tools & Services

Its common to hear about "highly optimized code" or some developer needing to optimize theirs and whatnot. However, as a self-taught, new programmer I've never really understood what exactly do people mean when talking about such things.


Care to explain the general idea of it? Also, recommend some reading materials and really whatever you feel like saying on the matter. Feel free to


View Replies


Need Help regarding Optimization
Category : Programming Languages

First of all I am an autodidact so I don't have great know how about optimization and stuff. I created a social networking website.


It contains 29 tables right now. I want to extend its functionality by adding things like yellow pages, events etc to make it more like a portal.


Now the question is should I simply add the tables in the same database or should I use a diffe


View Replies


Optimization? `i--` vs. `i++`
Category : Development Tools & Services

I was going through some JavaScript code when a loop structure caught my eye. It wasn't anything particularly special, rather it iterated in a manner different from what I do. When I need to loop something that isn't dependent on order, I typically count up, iterating from beginning to end, like so:


do
{
// I feel like I'm going in circles
i++;
} while

View Replies

TAGS : Optimization

gcc optimization: what does -O0 do?
Category : Programming Languages

According to the gcc online documentation, it


Reduce compilation time and make debugging produce the expected results.
This is the default.

So is it the same as leaving out -O flag at all or not?


View Replies


Optimization in GCC
Category : Programming Languages

I have two questions:


(1) I learned somewhere that -O3 is not recommended with GCC, because


The -O3 optimization level may increase the speed of the resulting executable, but can also increase its size. Under some circumstances where these optimizations are not favorable, this option might actually make a program slower. in fact it should not be used system-wide with


View Replies

TAGS : Optimization

awk optimization
Category : Development Tools & Services

any pointers on what must not be in an awk script? I am asking as I dont find any tool to debug an awk script. I have a script taking a lot of cpu so need to know if I am doing something terribly wrong with the script.


Just for an example, I keep looking for output of a logfile via 'tail -f filename' till my script gets killed.


View Replies

TAGS : optimization

Next
2012 / 2017 Copyrights BigHow , All Rights Reserved .