What flags are enabled by -XX:+AggressiveOpts on Sun JRE 1.6u20?

To check it for particular release: java -XX:-AggressiveOpts -XX:+UnlockDiagnosticVMOptions -XX:+PrintFlagsFinal -version > no_agg java -XX:+AggressiveOpts -XX:+UnlockDiagnosticVMOptions -XX:+PrintFlagsFinal -version > agg And then make diff (diff -U0 no_agg agg). For example, jdk 1.7.0_51: – bool AggressiveOpts := false {product} + bool AggressiveOpts := true {product} – intx AutoBoxCacheMax = 128 {C2 product} + intx AutoBoxCacheMax = … Read more

Examples of a monad whose Applicative part can be better optimized than the Monad part

Another example is a strict left fold. You can write an applicative instance which allows you to compose folds so that the resulting fold can be performed on the data in a single pass and constant space. However, the monad instance needs to re-iterate from the beginning of the data for each bind and keep … Read more

ZF2 Optimize for high traffic

There’s few very simple steps to achieve a faster application. There’s three things that can always be considered. ZF2 Performance QuickTipp #1 – ViewModels Always manually assign the fully qualified script to render. This will increase the performance a little. It’s done like this: public function someAction() { $viewModel = new ViewModel(); $viewModel->setTemplate(‘MODULE / CONTROLLER … Read more

Why is drawing a line less than 1.5 pixels thick twice as slow as drawing a line 10 pixels thick?

Summary: Antialiasing subpixel thickness lines is hard work and requires a number of dirty tricks to output what we intuitively expect to see. The extra effort you’re seeing is almost certainly due to antialiasing. When the line thickness is less than one pixel and the line doesn’t sit squarely at the center of a row … Read more

Modern x86 cost model

The best reference is the Intel Optimization Manual, which provides fairly detailed information on architectural hazards and instruction latencies for all recent Intel cores, as well as a good number of optimization examples. Another excellent reference is Agner Fog’s optimization resources, which have the virtue of also covering AMD cores. Note that specific cost models … Read more

What performance increases can we expect as the Perl 6 implementations mature?

Another thing you have to understand about the lack of optimization is that it’s compounded. A large portion of Rakudo is written in Perl 6. So for example the [+] operator is implemented by the method Any.reduce (called with $expression set to &infix:<+>), which has as its inner loop for @.list { @args.push($_); if (@args … Read more

tech