Skip to main content

Linpack FLOPS Benchmark

The numbers I've been reporting for Javascript and Perl performance need a context. Are they running on a Commodore 64, or a super-computer? Nope, it's my laptop, and here's what Linpack has to report about it: 4 core, 8 thread (Intel core i7) at 3.389 GHz. Peak performance is 46 GFLOPS.

Javascript and Perl are both single-threaded, so you only get 1/8 peak performance, 5 3/4 GFLOPS. That's still 1000 times the performance we actually achieve on more convenient languages. You have to sacrifice some things to gain benefits. On the optimistic side, a moderately fast modern computer sunning Perl or Javascript is almost as fast as  Sparc-10 running LINPACK.

Intel(R) LINPACK data

Current date/time: Fri Jun 12 01:19:06 2015

CPU frequency:    3.389 GHz
Number of CPUs: 1
Number of cores: 4
Number of threads: 8

Parameters are set to:

Number of tests                             : 15
Number of equations to solve (problem size) : 1000  2000  5000  10000 15000 18000 20000 22000 25000 26000 27000 30000 35000 40000 45000
Leading dimension of array                  : 1000  2000  5008  10000 15000 18008 20016 22008 25000 26000 27000 30000 35000 40000 45000
Number of trials to run                     : 4     2     2     2     2     2     2     2     2     2     1     1     1     1     1    
Data alignment value (in Kbytes)            : 4     4     4     4     4     4     4     4     4     4     4     1     1     1     1    

Maximum memory requested that can be used = 16200901024, at the size = 45000

============= Timing linear equation system solver =================

Size   LDA    Align. Time(s)    GFlops   Residual     Residual(norm)
1000   1000   4      0.019      35.5628  1.029343e-12 3.510325e-02
1000   1000   4      0.018      36.2016  1.029343e-12 3.510325e-02
1000   1000   4      0.018      36.1857  1.029343e-12 3.510325e-02
1000   1000   4      0.018      36.2075  1.029343e-12 3.510325e-02
2000   2000   4      0.136      39.2932  4.298950e-12 3.739560e-02
2000   2000   4      0.135      39.4407  4.298950e-12 3.739560e-02
5000   5008   4      1.923      43.3503  2.581643e-11 3.599893e-02
5000   5008   4      1.925      43.3232  2.581643e-11 3.599893e-02
10000  10000  4      14.781     45.1176  9.603002e-11 3.386116e-02
10000  10000  4      14.825     44.9833  9.603002e-11 3.386116e-02
15000  15000  4      49.465     45.4959  2.042799e-10 3.217442e-02
15000  15000  4      49.541     45.4258  2.042799e-10 3.217442e-02
18000  18008  4      85.142     45.6727  2.894987e-10 3.170367e-02
18000  18008  4      85.978     45.2284  2.894987e-10 3.170367e-02
20000  20016  4      115.975    45.9938  4.097986e-10 3.627616e-02
20000  20016  4      116.138    45.9292  4.097986e-10 3.627616e-02
22000  22008  4      156.203    45.4512  4.548092e-10 3.331299e-02
22000  22008  4      156.091    45.4840  4.548092e-10 3.331299e-02
25000  25000  4      227.453    45.8025  6.089565e-10 3.462917e-02
25000  25000  4      227.769    45.7390  6.089565e-10 3.462917e-02
26000  26000  4      254.249    46.0913  6.669421e-10 3.506981e-02
26000  26000  4      254.840    45.9845  6.669421e-10 3.506981e-02
27000  27000  4      284.795    46.0804  6.672171e-10 3.253690e-02
30000  30000  1      414.983    43.3796  8.421348e-10 3.319704e-02
35000  35000  1      732.317    39.0347  1.085509e-09 3.151068e-02
40000  40000  1      1479.396   28.8428  1.466774e-09 3.262155e-02
45000  45000  1      2764.282   21.9782  1.711494e-09 3.011194e-02

Performance Summary (GFlops)

Size   LDA    Align.  Average  Maximal
1000   1000   4       36.0394  36.2075 
2000   2000   4       39.3669  39.4407 
5000   5008   4       43.3367  43.3503 
10000  10000  4       45.0504  45.1176 
15000  15000  4       45.4608  45.4959 
18000  18008  4       45.4506  45.6727 
20000  20016  4       45.9615  45.9938 
22000  22008  4       45.4676  45.4840 
25000  25000  4       45.7708  45.8025 
26000  26000  4       46.0379  46.0913 
27000  27000  4       46.0804  46.0804 
30000  30000  1       43.3796  43.3796 
35000  35000  1       39.0347  39.0347 
40000  40000  1       28.8428  28.8428 
45000  45000  1       21.9782  21.9782 

End of tests



Comments

Popular posts from this blog

Creating Perl5 Objects with Moxie

Having in the previous article prepared data types for car suits and card ranks, I can now combine them to provide a playing card class, using Stevan Little's Moxie module (version 0.04, so definitely early days.) The goal is to provide an object-oriented paradigm to the Perl 5 programming language which is more sophisticated, more powerful and less verbose than manually bless()-ing hashes. To achieve that goal it needs to be faster and light-weight compared to Moose. Currently, Moxie.pm and and MOP.pm are add-on modules, but eventually, when they are more complete, when the wrinkles have been ironed out, and when they have gained acceptance and a community of users, they might be merged into the Perl core.

One significant feature of Moxie is that it reduces boilerplate code. You don't have to specify warnigns or strict. As well, the features or the perl you are using are enabled, among them say, state, signatures, and post_deref.
A Simple Moxie Class package Card { …

Perl5, Moxie and Enumurated Data Types

Moxie - a new object system for Perl5 Stevan Little created the Moose multiverse to upgrade the Perl 5 programming language's object-oriented system more in line with the wonderfull world of Perl 6. Unfortunately, it's grown into a bloated giant, which has inspired light-weight alternatives Moos, Moo, Mo, and others. Now he's trying to create a modern, efficient OO system that can become built into the language.

I've seen a few of his presentations at YAPC (Yet Another Perl Conference, now known as TPC, The Perl Conference), among them ‎p5 mop final final v5 this is the last one i promise tar gz<. So I was delighted to recently see an announcement of the module Moxie, and decided to try implementing a card game.

While the package provides some POD documentation about the main module, Moxie, it doesn't actually explain the enum package, Moxie::Enum. But delving into the tests directory reveals its secrets.
Creating an Enum package Ranks { use Moxie::Enum; …

Adventures in Autovivification

Having recently started a new job, I was exposed to old code with multi-step tests against autovivification in multi-level hashes. You get used to the code you have seen, but in a new environment it‘s irritating and jarring.
Moose does not generally have the problem, first because class structure is pre-declared, because values are accessed using accessor functions rather than directly, and because responsibility is delegated down to attributes, avoiding long chains. On the other hand, Moose has it's own overhead, so hand-rolled objects, and bare structures still have their use.
If you don‘t protect against autovivification, then mis-spelling a key, or referencing keys which haven‘t been instantiated in this instance, causes those keys to instantly come into existence.
#!/usr/bin/perl use warnings; use strict; use Data::Dump 'dump'; use 5.024; my $var = {key1 => {key2 => {key3 => 'a'}}}; say dump $var; if ( $var->{key1}{key2}{key3b}[13]{foob…