For fixed string length (I ran several times), clang++ computes ~ 0.3 seconds faster compared to g++. See also, the J script result with AVX2 enabled (total time 3.48103 secs).
# gcc 12.2.1
$ g++ -o llil2vec -std=c++11 -Wall -O3 -march=native -mtune=skylake -f
+align-functions=32 -fno-semantic-interposition -mno-vzeroupper -mpref
+er-vector-width=256 llil2vec.cpp
$ ./llil2vec big1.txt big2.txt big3.txt >out.txt
llil2vec (fixed string length=6) start
get_properties CPU time : 1.89609 secs
emplace set sort CPU time : 0.544972 secs
write stdout CPU time : 0.842451 secs
total CPU time : 3.28355 secs
total wall clock time : 4 secs
# clang version 15.0.4
$ clang++ -o llil2vec -std=c++11 -Wall -O3 -march=native -mtune=skylak
+e -falign-functions=32 -fno-semantic-interposition -mno-vzeroupper -m
+prefer-vector-width=256 llil2vec.cpp
$ ./llil2vec big1.txt big2.txt big3.txt >out.txt
llil2vec (fixed string length=6) start
get_properties CPU time : 1.67073 secs
emplace set sort CPU time : 0.474207 secs
write stdout CPU time : 0.828457 secs
total CPU time : 2.97343 secs
total wall clock time : 3 secs
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|