aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/python/grpcio_tests
diff options
context:
space:
mode:
authorGravatar Soheil Hassas Yeganeh <soheil@google.com>2018-10-18 15:49:42 -0400
committerGravatar Soheil Hassas Yeganeh <soheil@google.com>2018-10-18 16:04:20 -0400
commit3a9411ca1e733ce9f87b22136014c7a00bdeacbd (patch)
tree4ed040cb14b5ebb39f24837db6d70dc10e5090ff /src/python/grpcio_tests
parentdfcc96227c6fe1a18068171c988cb0c5f1250f19 (diff)
Optimize error handling for special cases.
This commit contains a few improvements: 1. Using a consequetive range of [0..4], will allow us to merge all branches of error_is_special into one comparison. 2. With (1), we can remove the for loops to find entries in error_status_map with a single O(1) lookup. 3. grpc_error_is_special() code paths should be inlined for ref and unref to avoid callq for the majority of cases where speical error is used. 4. grpc_error_get_int() should never accept a nullptr argument to avoid an expensive branch in the hot path. Callers should all allocate a dummy int on the stack when calling.
Diffstat (limited to 'src/python/grpcio_tests')
0 files changed, 0 insertions, 0 deletions