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

Check if SSE/denormal compilation is correct for Windows (MSVC) #289

Closed
totalgee opened this issue May 6, 2020 · 3 comments
Closed

Check if SSE/denormal compilation is correct for Windows (MSVC) #289

totalgee opened this issue May 6, 2020 · 3 comments

Comments

@totalgee
Copy link

totalgee commented May 6, 2020

Hi there, after the fix that was made by @jrsurge to fix "CPU spikes" on Windows with SC 3.11.0 (supercollider/supercollider#4504), I'm wondering if anything similar needs to be done for the compilation of SC3-plugins.

There was this fix (#63) done by @sonoro1234 a few years ago to fix denormals, but I wonder if the equivalent changes (related to SSE flags and denormal handling) weren't done for Windows(?). The side effect would be occasional CPU spikes with UGens like JPverb, and generally heavier-than-usual processor usage.

Perhaps all is fine (JPverb is a CPU hog); it would just be great if someone could check. Thanks!

@totalgee
Copy link
Author

totalgee commented May 6, 2020

Just an update, the issue may (also or only?) be with the Server monitor (green bar at bottom right of SC-IDE) on Windows…

There, for example, running a single JPverb on an i7-6700k desktop in Windows 10 shows ~13% CPU usage (average and peak). However, I just noticed the Task Manager actually shows scsynth CPU usage at only 0.7%. I was comparing this to an old MacBook Air (2012), which showed ~7% CPU usage in the green server bar, which is why I was so surprised by the poor performance on the powerful Windows machine.

On a fairly heavy performance setup, the SC server monitor shows nearly 40-50% CPU usage, but the actual CPU usage according to Task Manager is about 2.5%. I guess SC-IDE is maybe taking the CPU usage and multiplying it by the number of cores on the machine (8, if you include hyper-threading). But even then, it's off by a factor of at least 2.

(So, I'm definitely less worried now, but it would still be good to ensure the SSE flags are correct. ;-)

@sonoro1234
Copy link
Contributor

Denormal handling does not depent on compiler flags. It is done at run time in the main program (scsynth or supernova) and it sufficess for all loaded modules. The place in the main program were it was done was only compiled if SSE was defined but this is corrected now by (supercollider/supercollider#4504)

@mossheim mossheim closed this as completed May 6, 2020
@totalgee
Copy link
Author

totalgee commented May 7, 2020

Thanks @sonoro1234 for confirming!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants