Download presentation

Presentation is loading. Please wait.

Published byKrista Strutton Modified over 2 years ago

1
SIMD-Based Decoding of Posting Lists Alexander A. Stepanov, Anil R. Gangolli, Daniel E. Rose, Ryan J. Ernst, Paramjit Oberoi CIKM 2011 Glasgow, UK A9.com 130 Lytton Ave. Palo Alto, CA 94301 USA

2
Posting Lists ant bee cow … 12717351173521735521121… 3217352100908… 203404203410203412203478203500… 26 October 2011Stepanov et al., CIKM 20112 12717224133766… 321732083556… 203404626622… Replacing IDs with deltas gives smaller numbers, which can be stored in less space given appropriate encoding.

3
“vbyte” Format: 26 October 2011Stepanov et al., CIKM 20113 Grossman’s “Byte Aligned (BA)” Format: continuation bit data (7 bits) length (2 bits) data (6-30 bits) increasing byte addresses (additional bytes as needed) increasing byte addresses

4
Definition: Byte-Oriented Encoding 1.All significant bits of the natural binary representation are preserved. 2.Each byte contains bits from only one integer. 3.Data bits within a single byte of the encoding preserve the ordering they had in the original integer. 4.All data bits from a single integer precede all bits from the next integer. 26 October 2011Stepanov et al., CIKM 20114

5
Descriptors When does an integer end? Equivalent to knowing its length Encodings use auxiliary descriptor bits to represent the length 26 October 2011Stepanov et al., CIKM 20115

6
Dimensions of Encodings Descriptor can express length in binary or unary. Descriptor bits can be stored adjacent to each single integer, or descriptors of several integers can be grouped so that each byte contains either descriptor or data. If length of a single integer is expressed in unary, the bits of the unary representation may be packed contiguously or split across several bytes (as in vbyte). 26 October 2011Stepanov et al., CIKM 20116

7
A Taxonomy of Byte-Oriented Encodings Our NameArrangement Length Encoding Names in the Literature varint-SUSplitUnaryv-byte, vbyte, VB, varint, VInt PackedUnary GroupUnary SplitBinary varint-PBPackedBinaryBA, varint30 varint-GBGroupBinarygroup varint, k-wise (k=4) null suppression 26 October 2011Stepanov et al., CIKM 20117

8
A Taxonomy of Byte-Oriented Encodings Our NameArrangement Length Encoding Names in the Literature varint-SUSplitUnaryv-byte, vbyte, VB, varint, VInt varint-PUPackedUnarynone (introduced here) varint-GUGroupUnarynone (introduced here) varint-SBSplitBinarynone (not useful) varint-PBPackedBinaryBA, varint30 varint-GBGroupBinarygroup varint, k-wise (k=4) null suppression 26 October 2011Stepanov et al., CIKM 20118

9
Definition: Byte-Preserving Encoding We call a format byte-preserving if each byte containing significant bits in the original integer appears without modification in the encoded form. Observe: Encoding omits leading 0-bytes Decoding reinserts them 26 October 2011Stepanov et al., CIKM 20119

10
Re-Inserting 0-bytes in Parallel 00 00 CC BB BB BB AA AA 00 00 00 00 00 00 00 CC 00 BB BB BB 00 00 AA AA 26 October 2011Stepanov et al., CIKM 201110

11
Format for SIMD Decoding Group descriptor bits from several encoded integers into a separate descriptor byte Group data bytes into k-byte blocks Decode however many integers fit in this block 26 October 2011Stepanov et al., CIKM 201111

12
11001101 varint-GU 1 descriptor byte increasing byte addresses Example: Encode 4 integers 0xAAAA, 0xBBBBBB, 0xCC, 0xDDDDDDDD. Byte counts are 2, 3, 1, 4. Last integer doesn’t fit in this block; pad with 0s. increasing byte addresses 8 data bytes Represent up to 8 variable-sized integers (as many as fit in 8 bytes) For each integer i, descriptor contains length(i)-1 in unary, separated by 0s Number of integers in block is number of zero bits in descriptor 0xAA0x00 0xCC0xBB 0xAA 26 October 2011Stepanov et al., CIKM 201112

13
Intel SIMD PSHUFB Instruction Permutes data bytes in parallel, with optional insertion of 0-bytes. Operation specified by a “shuffle sequence” Both data and shuffle sequences are stored in special registers (currently 16 bytes) 26 October 2011Stepanov et al., CIKM 201113

14
Decoding Using PSHUFB We pre-compute a table of 256 possible shuffle sequences Each descriptor uniquely identifies the arrangement and lengths of the integers So, we use descriptor to index into table 26 October 2011Stepanov et al., CIKM 201114

15
Generic Decoding Algorithm 1.Read a chunk of data and its corresponding descriptor. 2.Look up the appropriate shuffle sequence and offset from the table. 3.Perform the shuffle. 4.Write the result. 5.Advance the input and output pointers. 26 October 2011Stepanov et al., CIKM 201115

16
Results: Decoding Speed 26 October 2011Stepanov et al., CIKM 201116

17
Conclusions Taxonomy of byte-oriented formats clarifies relationships of existing formats and reveals new ones. SIMD provides significant performance gains for integer decoding. New format (varint-GU) outperforms others. 26 October 2011Stepanov et al., CIKM 201117

Similar presentations

OK

Final Exam Review Instructor : Yuan Long CSC2010 Introduction to Computer Science Apr. 23, 2013.

Final Exam Review Instructor : Yuan Long CSC2010 Introduction to Computer Science Apr. 23, 2013.

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on mind reader computer Ppt on google glass project Ppt on network theory concepts Ppt on 2d nmr spectroscopy Ppt on power generation by speed breaker specification Ppt on breast cancer screening Problem solution reading ppt on ipad Ppt on guru nanak dev ji Download ppt on 2d and 3d shapes Ppt on solar system for class 2