Evaluate Squaring Improvement by Marco Bodrato

Issue #12 resolved
Former user created an issue

Marco Bodrato wrote:

"I've found a sequence that can giv some small improvements (in the linear part, not asymptotically) for matrix squaring. As a test for those sequences, I took your "strassen.c" for the M4RI library and modified it to apply the operations I propose. For the general product, the new code should be "as fast as" the old one (and maybe there is no need for the new sequence). For matrix squaring (C=A*A) it should give a small speed-up (around 1%)."

Code:

http://bodrato.it/software/strassen.html#M4R

Description

http://marco.bodrato.it/papers/Bodrato2008-StrassenLikeMatrixMultiplicationForSquares.pdf

Comments (3)

  1. Martin Albrecht repo owner

    Committed in Wiki macro error: Changeset 297b5e5f9691 not found. with the following results on a Core2Duo CPU:

    orig multiplication (geom)

    dimminavgmedmax
    100001.5101.5221.5201.550
    163845.6505.6545.6505.700
    2000010.89010.93310.94010.940
    3200039.83039.98939.99040.210

    new multiplication (geom)

    dimminavgmedmax
    100001.5201.5231.5201.550
    163845.6905.6945.6905.720
    2000010.86010.90110.90010.910
    3200039.87039.95239.95040.090

    orig squaring (geom)

    dimminavgmedmax
    100001.4901.4991.5001.530
    163845.6405.6495.6505.690
    2000010.90010.91110.91010.930
    3200039.80039.95539.93040.260

    new squaring (geom)

    dimminavgmedmax
    100001.4601.4641.4601.490
    163845.5605.5695.5705.580
    2000010.63010.68010.68010.690
    3200039.33039.40939.42039.590
  2. Martin Albrecht repo owner

    Opteron Timings

    old multiplication

    dimminavgmedmax
    100002.5802.6162.6202.708
    1638410.09710.52510.63310.753
    2000018.41318.63518.67718.849
    3200067.78468.48468.52069.412

    new multiplication

    dimminavgmedmax
    100002.6202.6302.6242.676
    1638410.24510.49110.57710.737
    2000018.55718.77318.81719.037
    3200067.97268.88568.96069.704

    old squaring

    dimminavgmedmax
    100002.6442.6602.6522.696
    1638410.35310.73810.83711.013
    2000018.20518.52618.58118.973
    3200068.12069.36069.76070.236

    new squaring

    dimminavgmedmax
    100002.5682.6002.5962.652
    1638410.20110.44510.57310.585
    2000018.12518.53418.62918.685
    3200066.85668.21168.30868.952
  3. Martin Albrecht repo owner

    Opteron Timings

    old multiplication

    dimminavgmedmax
    100002.5802.6162.6202.708
    1638410.09710.52510.63310.753
    2000018.41318.63518.67718.849
    3200067.78468.48468.52069.412

    new multiplication

    dimminavgmedmax
    100002.6202.6302.6242.676
    1638410.24510.49110.57710.737
    2000018.55718.77318.81719.037
    3200067.97268.88568.96069.704

    old squaring

    dimminavgmedmax
    100002.6442.6602.6522.696
    1638410.35310.73810.83711.013
    2000018.20518.52618.58118.973
    3200068.12069.36069.76070.236

    new squaring

    dimminavgmedmax
    100002.5682.6002.5962.652
    1638410.20110.44510.57310.585
    2000018.12518.53418.62918.685
    3200066.85668.21168.30868.952
  4. Log in to comment