HPCC-12486 Optimize binding module functions

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Merge pull request #6597 from ghalliday/issue12486

HPCC-12486 Optimize binding module functions

Reviewed-By: Jamie Noss <james.noss@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>