Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigating speed decrease between Jan 2019 and Jan 2020 #89

Closed
fangq opened this issue Feb 8, 2020 · 1 comment
Closed

Investigating speed decrease between Jan 2019 and Jan 2020 #89

fangq opened this issue Feb 8, 2020 · 1 comment
Assignees

Comments

@fangq
Copy link
Owner

fangq commented Feb 8, 2020

reported by @ShijieYan:

A speed drop was noted compared to the earlier version of MCX(Jan 2019). For instance:

For the mcx_gpu_contest.m on a GTX 1080Ti (Ubuntu 18.04, nvcc 9.0, Nvidia Driver 390.129):

  1. The latest MCXLAB (commit: 485b1ea) report benchmark score of 70523 (-26.6%). The additional speed drop is likely due to the branching added for the support of the hybrid optical property;
  2. The MCXLAB on Jan 25 2019 (prior to the support of hybrid optical property) reports 83281 (-13.4%);
  3. The MCXLAB on Dec 8 2019 reports 83281 (-13.4%);
  4. The MCXLAB on Sep 6 2019 reports 82946 (-13.7%);
  5. The MCXLAB during our workshop (Aug 8 2019, commit: 0bdbef6) reports 89599 (-6.8%);
  6. The MCXLAB v2019.4 (commit: 711bf81) reports 91757 (-4.5%);
  7. The MCXLAB v2019.3 (commit: ac76ff7) reports 97156 (no decrease);
  8. The version back on Jan 18 2019 (commit: 335c9a0) reports 96115 (baseline);

For the demo_photon_sharing.m on a GTX 1080Ti (Ubuntu 18.04, nvcc 9.0, Nvidia Driver 390.129):

  1. The latest MCXLAB (commit: 485b1ea) reports 14522 photon/ms (-45.2%)
  2. The MCXLAB on Jan 25 2019 (prior to the support of hybrid optical property) reports 14094.43 photon/ms (-46.8%);
  3. The MCXLAB during our workshop (Aug 8 2019, commit: 0bdbef6) reports 18796.99 photon/ms (-29.0%);
  4. The MCXLAB v2019.4 (commit: 711bf81) reports 18338.53 photon/ms (-30.7%);
  5. The MCXLAB v2019.3 (commit: ac76ff7) reports 23769.91 photon/ms (-10.2%);
  6. The version back on Jan 18 2019 (commit: 335c9a0) reports 26476.04 photon/ms (baseline);
@fangq fangq self-assigned this Feb 8, 2020
@fangq fangq closed this as completed in ba78df5 Feb 9, 2020
@fangq
Copy link
Owner Author

fangq commented Feb 11, 2020

Qianqian Fang, Project Admin, Feb 8

Shijie, I found two commits are responsible for this speed decrease:

In Aug. 15, I removed the source type template, and replaced with 3 flag templates

1482b0a

this has caused the biggest speed drop based on my test

the 2nd one is less as important, but also contributes to the slow down, i.e. the change to support continuous media

ac10b73

I am going to revert the first one.


Qianqian Fang, Project Admin, Feb 8

#89 is fixed

I added the source type template back, and also added a new template for label-based medium to disable updatepropery().

this brings b1 back to 73kp/ms, b2 to 36kp/ms, b3 to 39kp/ms.
before this change, b1 was 59kp/ms, b2 was 29kp/ms, b3 was 30kp/ms.

the downside of having a lot of template is the long compile time - about 20 second -30 second on i7. the file size is also big - 13MB.

at some point, I got even higher speed - for B1, I got 97kp/ms, but I was not able to reproduce it.

jdtatz pushed a commit to jdtatz/mcx that referenced this issue Jul 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant