eliminate the function calls in critical path of mega_send.c, not debugged