NOC-MSM / SE-NEMO

Shelf Enabled Global NEMO
GNU General Public License v3.0
2 stars 1 forks source link

Use of WHERE vs existing implicitly looped code - is there a likely non-trivial perfomance difference? #126

Closed chris-O-wilson closed 10 months ago

chris-O-wilson commented 10 months ago
          > yes I think wmask is zero where ever tmask (:,:,1) is zero, so yes we could drop the last tmask, but I'd leave it there for clarity.

I'd stick with this way do doing it as it matches whats done is other parts of the code. I'm not sure how expensive "where" is ?

@jasontempestholt , I'm not sure what the difference in cost between WHERE and this version would be. @jdha do you know? If there's nothing obvious, I guess it's fine to leave this code as is.

_Originally posted by @chris-O-wilson in https://github.com/NOC-MSM/SE-NEMO/pull/125#discussion_r1378776274_

chris-O-wilson commented 10 months ago

@jdha Could you comment on this please, so that I can resolve the issue?

jdha commented 10 months ago

@chris-O-wilson I'm afraid I don't know the answer to that. I would just keep the current format. When I have a moment I'll follow this up as I'm intrigued ...