Eliminate some redundant checks on num in newhash
num
newhash
The newhash instruction was checking if num is greater than 0, but so is rb_hash_new_with_size as well as rb_hash_bulk_insert.
rb_hash_new_with_size
rb_hash_bulk_insert
If we know the size is 0 in the instruction, we can just directly call rb_hash_new and only check the size once. Unfortunately, when num is greater than 0, it's still checked 3 times.
rb_hash_new
Eliminate some redundant checks on
numinnewhashThe
newhashinstruction was checking ifnumis greater than 0, butso is
rb_hash_new_with_sizeas well as
rb_hash_bulk_insert.If we know the size is 0 in the instruction, we can just directly call
rb_hash_newand only check the size once. Unfortunately, when num isgreater than 0, it's still checked 3 times.