Thanks.
Out of curiousity, I tried to optimize the SWS version, if you want you can check:
https://www.dropbox.com/s/i5e7zf755b...sws64.dll?dl=1
It seems a bit faster here now than your script.
If you test, you think the speed improvement (if any) is worth keeping the SWS version?