diff options
| author | Dmitry Stogov <dmitry@zend.com> | 2018-04-28 14:13:12 +0300 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@zend.com> | 2018-04-28 14:13:12 +0300 |
| commit | c88be6aee1f5127b9017812bdcfecb335e6e5d4c (patch) | |
| tree | 8e167931ced8567edf7f3cf8a6221dddd87fe9e2 /ext/mysqlnd/mysqlnd_result.c | |
| parent | 8a719c1b12f16e22fd71ff993b64ebfc4e5d67be (diff) | |
| download | php-git-c88be6aee1f5127b9017812bdcfecb335e6e5d4c.tar.gz | |
Bit check micro-optimization
Diffstat (limited to 'ext/mysqlnd/mysqlnd_result.c')
| -rw-r--r-- | ext/mysqlnd/mysqlnd_result.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/mysqlnd/mysqlnd_result.c b/ext/mysqlnd/mysqlnd_result.c index 27e32a7d21..653197e302 100644 --- a/ext/mysqlnd/mysqlnd_result.c +++ b/ext/mysqlnd/mysqlnd_result.c @@ -108,7 +108,7 @@ MYSQLND_METHOD(mysqlnd_result_buffered_c, initialize_result_set_rest)(MYSQLND_RE for (i = 0; i < result->row_count; i++) { /* (i / 8) & the_bit_for_i*/ - if (initialized[i >> 3] & (1 << (i & 7))) { + if ((initialized[i >> 3] >> (i & 7)) & 1) { continue; } @@ -1151,7 +1151,7 @@ MYSQLND_METHOD(mysqlnd_result_buffered_c, fetch_row)(MYSQLND_RES * result, void if (rc != PASS) { DBG_RETURN(FAIL); } - if (!(set->initialized[set->current_row >> 3] & (1 << (set->current_row & 7)))) { + if (!((set->initialized[set->current_row >> 3] >> (set->current_row & 7)) & 1)) { set->initialized[set->current_row >> 3] |= (1 << (set->current_row & 7)); /* mark initialized */ ++set->initialized_rows; |
