LGTM
http://codereview.chromium.org/1695007/diff/1/2 File src/ia32/codegen-ia32.cc (right): http://codereview.chromium.org/1695007/diff/1/2#newcode6625 src/ia32/codegen-ia32.cc:6625: __ add(FieldOperand(ecx, kCacheSizeOffset), Immediate(2 << 1)); It's not lea that is faster (it just saves one instruction over a move and and add), but avoiding the read entirely. Reads are the worst-case of memory access. If they fail the L1 cache, they can be very expensive (not likely here, since we loaded the value recently anyway), and the following operations typically delay for the value to load (especially in a read-modify-write operation like add to memory). http://codereview.chromium.org/1695007/diff/1003/9003 File src/x64/codegen-x64.cc (right): http://codereview.chromium.org/1695007/diff/1003/9003#newcode4294 src/x64/codegen-x64.cc:4294: STATIC_ASSERT(kSmiTagSize == 1); Remove asserts (comment is no longer true). http://codereview.chromium.org/1695007/diff/1003/9003#newcode4301 src/x64/codegen-x64.cc:4301: __ SmiSubConstant(dst_, dst_, kEntrySizeSmi); Consider converting the smi to a 32-bit integer and do computations on that. With the current encoding, Smi constants are loaded as 64-bit constants in a separate instruction, so there is an overhead to save. http://codereview.chromium.org/1695007/diff/1003/9003#newcode4319 src/x64/codegen-x64.cc:4319: // Consider prefetching into some reg. Don't just consider it. Do it, and convert it to integer from smi so your loop-variable doesn't have to be a smi. You should have plenty of registers to work with on X64. http://codereview.chromium.org/1695007/show -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
