[Chapel Merge] Optimize out a copy in ZMQ recv for local operatio

Branch: refs/heads/main
Revision: e90f689
Author: ronawho
Log Message:

Merge pull request #18126 from ronawho/reduce-zmq-copies

Optimize out a copy in ZMQ recv for local operations

[reviewed by @e-kayrakli and @lydia-duncan]

Previously, an extra copy was being done when calling ZMQ recv from
the locale that owns the Socket. This copy can be slow for large
byte/string operations so eliminate it when we can.

Motivated by Investigate performance of client-server array transfers · Issue #794 · Bears-R-Us/arkouda · GitHub

Modified Files:
M modules/packages/ZMQ.chpl

Compare: https://github.com/chapel-lang/chapel/compare/0f9da81f1db0...e90f6898852e