ReleaseNotes:3D Graphing Speed Comparison

From OriginLab Wiki

Jump to: navigation, search


[edit] Main Result Table

Origin 9 offers ultrafast 3D graphing
Task to Measure Time Origin 8.6 (sec) Origin 9 OpenGL (sec) Origin 9 Improvement
Creating a colormap surface plot 13.91 0.84 17 times faster
Graph redraw after changes 13.83 0.48 29 times faster
Graph redraw without changes 2.6 0.039 67 times faster
Rotating the graph by 5 degrees 13.61 0.044 309 times faster


[edit] Testing Environment Foot Note

  • OS:Ewin7_64
  • Hardware: AMD Radeon HD 7570, OpenGL:4.1.11251, CPU:Intel i7 3770, Memory:16G
  • Both Origin 9 and 8.6 are using 64 bit versions.
  • 1000x1000 Matirx
  • Origin 9 OpenGL graph tested with anti-alias enabled, a feature not found in older 3D before OpenGL. When anti-alias is turned off, OpenGL will be even faster, but not by much.


Contents


[edit] Preparation

[edit] Save template so we are comparing the same plot type

We use 3D Colormap Surface. Turn off Speed mode. Turn off Contour lines. Set Colormap level to be 8. Then saved it as the default 3D Colormap Surface template under User Files Folder.

//LT code for 8.6
newbook mat:=1;	
run.section(Plot3D,ColorMap);
 
speedmode sm:=off;
layer.cmap.numMajorLevels=8;
layer.cmap.numMinorLevels=0;
layer.cmap.showLines(3);
 
save -t %H %YCMAP.otp;
 
//LT code for 9.0
newbook mat:=1;	
run.section(Plot3DGL,ColorMap);
 
speedmode sm:=off;
layer.cmap.numMajorLevels=8;
layer.cmap.numMinorLevels=0;
layer.cmap.showLines(3);
 
save -t %H %YglCMAP.otp;

[edit] Turn on or off Anti-aliasing in 9.0

9.0 support Anti-aliasing. By default it's enabled. We compared result with Anti-aliasing on (new in 9.0). In some table below, we also compared with Anti-aliasing off. Without Anti-aliasing, Origin 9.0 is even faster.

@oglfa=0; //Disable Anti-aliasing
@oglfa=1; //Enable Anti-aliasing. This is default.

[edit] Create 1000x1000 Matrix

In both 9.0 and 8.6, Start a new project, and create 1000x1000 matrix. Set Matrix Value to be sin(x ) + cos( y) /y.

doc -s;
doc -n;
///Create matrix
newbook mat:=1;	
mdim cols:=1000 rows:=1000; 
msetvalue im:=Mat(1) formula:="sin(x) + cos(y) /y";

[edit] Testing Cases

[edit] Creation

How long does it take to create a new 3D colormap surface plot from a template with speed mode turned off, 8 color levels and no contour lines.

//LT code for 8.6
//With Matrix prepared in Preparation part active
type -mb 1;//to prevent reminder message box
sec -ab; 
run.section(Plot3D,ColorMap);
queue{sec -ae nn; ty "Plot Colormap Surface Elapsed Ttime=$(nn)";};
 
 
//LT code for 90 OpenGL
//With Matrix prepared in Preparation part active
type -mb 1;;//to prevent reminder message box
sec -ab; 
run.section(Plot3DGL,ColorMap);
queue{sec -ae nn; ty "Plot Colormap Surface Elapsed Time=$(nn)";};

[edit] Update

How long does it take to reconstruct the graph after some changes. The code below will trigger scale change which will result in complete reconstruction of the graph.

//same code can be used for 86 and 90
sec -ab;
x1=x1;
queue{sec -ae nn; ty "Redraw Ggraph Elapsed Time=$(nn)";};

[edit] Rotation

How long does it take to rotate a 3D colormap surface plot by 5 degrees.

openGL rotation will directly render the graph and the rendering code is built into the layer -3D RA labtalk command in SR1 so that there is no need to use plot -L to redraw he layer after rotation.

///rotation code for version 86
sec -ab;
layer -3D R Z 5;Plot -L;
sec -ae nn; ty "Rotation Elapsed time=$(nn)";
 
 
///rotation code for version 9.0 SR1, rotation speed is the same between 90SR0 and SR1 but the LT RA switch was added in SR1, so 
///this code requires SR1 to run
sec -ab;
layer -3D RA Z 5;
sec -ae nn; ty "Rotation Elapsed time=$(nn)";

[edit] Repaint

This is the basic graph repaint time when nothing is changed. Typically when a graph is uncovered and it needs to repaint the area that is uncovered.

We need to keep the graph the same size. The LT command that works in both 86 and 90 to trigger a repaint of the active window is doc -uwfp. This command will repaint immediately, so no queue command is needed.

sec -ab;doc -uwfp;sec -ae v1;
ty "Repaint Elapsed Time is $(v1,*2*) sec.";

[edit] Testing Results for Inhouse Use

For each testing cases, we need to give the following before the table

  1. Machine description, OS, Origin 64 or 32. We need to first test only 64 bits
  2. Location of the machine, Noho, GZ etc
  3. Who did the test and the date of the test


Each table will report the Testing Cases above. These are all single words, since details has been documented. The table will list the cases in rows and have the following columns:

  1. Task
  2. 90 OpenGL
  3. 86 Vector Caching
  4. Improvement Factor


[edit] 500x500 Matrix to make colormap surface plot without speed mode

[edit] Test 1

OS:Ewin7_64

System configuration: NV520GT, OpenGL 4.2, CPU:Intel i7 3770, Memory: 8G

Testing Build:IR90Sr1_49 and 8.6Sr3

Task 9.0_64bit OpenGL 8.6_64bit Vector Caching Improvement Factor
Create Colormap Surface 0.343 4.438 13
Redraw graph 0.146 4.338 30
Rotation 0.020 4.288 214
Repaint 0.022 1.5 68

[edit] Test 2

OS:Ewin7_64

System configuration: AMD Radeon HD 7570, OpenGL:4.1.11251, CPU:Intel i7 3770, Memory:16G

Testing Build:IR90Sr1_49 and 8.6Sr3

Task 8.6_64bit Vector Caching 9.0_64bit OpenGL(No Anti-Aliasing) Improvement Factor() 9.0_64bit OpenGL(Enable Anti-aliasing) Improvement Factor
Create Colormap Surface 4.19 0.41 10 0.41 10
Redraw graph 4.11 0.15 27 0.15 27
Rotation 4.042 0.014 289 0.015 269
Repaint 1.1 0.015 73 0.019 58

[edit] 1000x1000 Matrix to make colormap surface plot without speed mode

[edit] Test1

OS:Ewin7_64

System configuration: NV520GT, OpenGL 4.2, CPU:Intel i7 3770, Memory: 8G

Testing Build:IR90Sr1_49 and 8.6Sr3

Task 9.0_64bit OpenGL 8.6_64bit Vector Caching Improvement Factor
Creation Colormap Surface 0.745 10.583 14
Redraw graph 0.422 10.234 24
Rotation 0.0347 10.102 291
Repaint 0.033 4.4 133

[edit] Test2

OS:Ewin7_64

System configuration: AMD Radeon HD 7570, OpenGL:4.1.11251, CPU:Intel i7 3770, Memory:16G

Testing Build:IR90Sr1_49 and 8.6Sr3

Task 8.6_64bit Vector Caching 9.0_64bit OpenGL(No Anti-Aliasing) Improvement Factor() 9.0_64bit OpenGL(Enable Anti-aliasing) Improvement Factor
Create Colormap Surface 13.91 0.80 17 0.84 17
Redraw graph 13.83 0.48 29 0.48 29
Rotation 13.61 0.035 389 0.044 309
Repaint 2.6 0.037 70 0.039 67