EricWF added a comment.

Added more review comments for the boyer_moore searcher.


================
Comment at: include/experimental/functional:256
@@ +255,3 @@
+        
+public: // TODO private:
+    _RandomAccessIterator1 __first_;
----------------
Is this for testing?

================
Comment at: include/experimental/functional:313
@@ +312,3 @@
+
+    void build_suffix_table(_RandomAccessIterator1 __f, _RandomAccessIterator1 
__l, 
+                                                    _BinaryPredicate __pred)
----------------
This needs to be a reserved identifier right?

================
Comment at: include/experimental/functional:319
@@ +318,3 @@
+        {
+            _VSTD::vector<value_type> reversed(__count);
+            (void) _VSTD::reverse_copy(__f, __l, reversed.begin ());
----------------
It seems like we could do a lot more in this section to

1. Use less memory at any given time.
2. Reuse previously allocated memory.

I think the following changes could improve the QoI.

1. Move the loop that uses  `__prefix` to be directly following the 
initialization of it.
2. Pass reverse_iterator adaptors to `__compute_bm_prefix` instead of computing 
`reversed`.
3. Reuse the memory in `__prefix`  for `__prefix_reversed`. 

Unless I'm missing something those changes should be possible, and they reduce 
the amount of memory used by two thirds. 


http://reviews.llvm.org/D11380



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to