src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase.ts/PieceTreeBase/equal
class PieceTreeBase:	public equal(other: PieceTreeBase): boolean {
		if (this.getLength() !== other.getLength()) {
			return false;
		}
		if (this.getLineCount() !== other.getLineCount()) {
			return false;
		}

		const offset = 0;
		const ret = this.iterate(this.root, node => {
			if (node === SENTINEL) {
				return true;
			}
			const str = this.getNodeContent(node);
			const len = str.length;
			const startPosition = other.nodeAt(offset);
			const endPosition = other.nodeAt(offset + len);
			const val = other.getValueInRange2(startPosition, endPosition);

			return str === val;
		});

		return ret;
	}