发明名称 Acceleration of string comparisons using vector instructions
摘要 A processor, method, and medium for using vector instructions to perform string comparisons. A single instruction compares the elements of two vectors and simultaneously checks for the null character. If an inequality or the null character is found, then the string comparison loop terminates, and a further check is performed to determine if the strings are equal. If all elements are equal and the null character is not found, then another iteration of the string comparison loop is executed. The vectors are loaded with the next portions of the strings, and then the next comparison is performed. The loop continues until either an inequality or the null character is found.
申请公布号 US9009447(B2) 申请公布日期 2015.04.14
申请号 US201113185244 申请日期 2011.07.18
申请人 Oracle International Corporation 发明人 Gove Darryl J.
分类号 G06F9/30 主分类号 G06F9/30
代理机构 Meyertons, Hood, Kivlin, Kowert & Goetzel, P.C. 代理人 Rankin Rory D.;Meyertons, Hood, Kivlin, Kowert & Goetzel, P.C.
主权项 1. A method comprising: loading a portion of a first string into a first vector register and loading a portion of a second string into a second vector register, wherein each of the first and second vector registers comprises a plurality of N elements, wherein N is an integer; performing two comparison operations simultaneously, wherein a first comparison operation compares each element of the first vector register to a corresponding element of the second vector register, and wherein a second comparison operation compares each element of the first vector register to a null terminating character; storing results of said first and second comparison operations in a third vector register; and responsive to said results indicating no inequalities or null terminating characters were found, repeating said loading, performing, and storing steps.
地址 Redwood Shores CA US