Project

General

Profile

« Previous | Next » 

Revision 57bf354c

Added by tenderlovemaking (Aaron Patterson) about 4 years ago

Eliminate some redundant checks on num in 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.

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.