Assigned Feature Request P3 Add Hotlist Status UpdateNo update yet.Descriptionja...@gmail.com created issue #1Apr 22, 2020 05:51PMCode calling Integer.divideUnsigned(value, 2) produces the following Dalvik bytecode: 000108: 1220 |0000: const/4 v0, #int 2 00010a: 7120 0200 0100 |0001: invoke-static {v1, v0}, Ljava/lang/Integer;.divideUnsigned:(II)I 000110: 0a01 |0004: move-result v1 Because of the use of a power of two, the code could be 000170: e100 0101 |0000: ushr-int/lit8 v0, v1, #int 1 // #01 For a teensy tiny savings in size and possibly an equally small performance bump (I haven't checked if Integer.divideUnsigned is an ART intrinsic). The same is true for Long.divideUnsigned and ushr-long. Issue summaryCommentsAll comments Oldest first ze...@google.com <ze...@google.com> Apr 22, 2020 06:10PMReassigned to sg...@google.com.ot...@google.com <ot...@google.com> #2Jul 8, 2020 02:27PMInformation redacted by Android Beta Feedback.Add comment Comment
Description
Code calling
Integer.divideUnsigned(value, 2)
produces the following Dalvik bytecode:Because of the use of a power of two, the code could be
For a teensy tiny savings in size and possibly an equally small performance bump (I haven't checked if
Integer.divideUnsigned
is an ART intrinsic).The same is true for
Long.divideUnsigned
andushr-long
.