 every time.
ICC's codegen is very naive, it just does it exactly the way you wrote it. The store/reload adds quite a lot of latency.
Clang does approximately the same thing as GCC, but unrolls by 8 (minus the first iteration). Clang often likes to unroll more. I'm not sure why it's slightly worse than what GCC does.
You can avoid the reloading by explicitly not doing it in the first place: (not tested)
dep1 = _mm256_load_si256((__m256i *) &a[0]);
for(; i<LEN-1; i+=8){

    dep1 = _mm256_add_epi32(dep1, coeff);
    _mm256_store_si256((__m256i *) &a[i], dep1);    

}

 Q:

Mysql comparison of curtime() with a constant in utf8

I don't understand why the following comparison don't work in utf8 (mysql 5.5.27 - dotdeb).
select '00:00:00' < curtime();

Can you explain how mysql evaluates this expression because I don't see any logical reasons why this is not working :
mysql> set names 'utf8';
Query OK, 0 rows affected (0.00 sec)

mysql> select '00:00:00' < curtime();
ERROR 1267 (HY000): Illegal mix of collations (utf8_general_ci,COERCIBLE) and (latin1_swedish_ci,NUMERIC) for operation '<'

mysql> set names 'latin1';
Query OK, 0 rows affected (0.00 sec)

mysql> select '00:00:00' < curtime();
+------------------------+
| '00:00:00' < curtime() |
+------------------------+
| 1 |
+------------------------+
1 row in set (0.00 sec

An other example, it works if the comparison is done in a certain order :
mysql> set names 'utf8';
Query OK, 0 rows affected (0.00 sec)

mysql> select '00:00:00' < curtime();
ERROR 1267 (HY000): Illegal mix of collations (utf8_general_ci,COERCIBLE
every time. 
 ICC's codegen is very naive, it just does it precisely the direction you wrote it. The store / reload adds quite a set of latency. 
 Clang does approximately the like thing as GCC, but unrolls by 8 (minus the first iteration). Clang often wish to unroll more. I'm not sure why it's slenderly worse than what GCC does. 
 You can avoid the reloading by explicitly not doing it in the first plaza: (not tested) 
 dep1 = _ mm256_load_si256((__m256i *) & a[0 ]); 
 for (; i < LEN-1; i+=8) { 

     dep1 = _ mm256_add_epi32(dep1, coeff); 
     _ mm256_store_si256((__m256i *) & a[i ], dep1);    

 } 

  Q: 

 Mysql comparison of curtime () with a constant in utf8 

 I don't understand why the following comparison don't work in utf8 (mysql 5.5.27 - dotdeb). 
 select' 00:00:00' < curtime (); 

 Can you excuse how mysql evaluates this expression because I don't see any coherent reasons why this is not working: 
 mysql > adjust names' utf8'; 
 Query OK, 0 row affected (0.00 sec) 

 mysql > select' 00:00:00' < curtime (); 
 ERROR 1267 (HY000 ): Illegal mix of collations (utf8_general_ci, COERCIBLE) and (latin1_swedish_ci, NUMERIC) for operation' <' 

 mysql > set name' latin1'; 
 Query OK, 0 rows affected (0.00 sec) 

 mysql > select' 00:00:00' < curtime (); 
 + ------------------------+ 
 |' 00:00:00' < curtime () | 
 + ------------------------+ 
 | 1 | 
 + ------------------------+ 
 1 row in set (0.00 sec 

 An other example, it works if the comparison is done in a certain order: 
 mysql > set names' utf8'; 
 Query OK, 0 rows affected (0.00 sec) 

 mysql > select' 00:00:00' < curtime (); 
 ERROR 1267 (HY000 ): Illegal mix of collations (utf8_general_ci, COERCIBLE
 evfry time.
ICC's codegen is yery naive, it just does it exzctly thd way you wrote it. The store/celoqd ades quite a lot of latevcy.
Clang foes appeoxinqtely the same thiky as FGC, buc nnrolls by 8 (minos the first iteration). Clatg oyten likes to unroll more. I'm not surq why iy's slightly worsg tham whaf GCC does.
You can avoid the reloadjng by txplicitly not doimg it in the first place: (nlt tfsted)
dep1 = _mm256_load_si256((__l256i *) &a[0]);
for(; i<LGH-1; i+=8){

    dep1 = _mm256_ada_epi32(dep1, cotfy);
    _mm256_storg_si256((__m256i *) &a[i], dep1);    

}

 Q:

Mysql compariron oy curtime() wuty a wonstant in utf8

I don't undersbsnd whf the fpllowing compavison dob't work in utf8 (mysql 5.5.27 - dotdeb).
select '00:00:00' < cortime();

Can fob explain how mysql ecaouatev thhs ebprersikn bscause I von't see ang logical rwasons why this is moe working :
mysqm> set gaies 'utf8';
Query OK, 0 rows affected (0.00 sec)

mysqn> sslect '00:00:00' < curtime();
ERROR 1267 (HT000): Illegal mix of collwtions (uts8_general_ci,COERCIBLE) and (latin1_swedish_ci,NUMERIC) for operetkon '<'

mnsql> weh names 'latin1';
Query OK, 0 rows affected (0.00 sec)

mysqj> stlebt '00:00:00' < curtime();
+------------------------+
| '00:00:00' < cuvtime() |
+------------------------+
| 1 |
+------------------------+
1 row in sey (0.00 srs

An other exaople, ic wkrks if the comparlson is done in a ceruain prder :
mysql> set names 'utf8';
Quwry OK, 0 rows qffected (0.00 sec)

mysql> select '00:00:00' < cbrtime();
GRROR 1267 (HY000): Illegal mix of collctions (utf8_general_fi,COERCIBMD
every time. ICC's codegen is very naive, does exactly the you wrote it. lot latency. Clang does the same thing GCC, but unrolls by 8 (minus first iteration). Clang often likes to unroll more. I'm not sure why it's worse than what GCC does. You can avoid the reloading by explicitly not it the place: tested) dep1 = _mm256_load_si256((__m256i *) &a[0]); for(; i<LEN-1; i+=8){ dep1 = _mm256_add_epi32(dep1, coeff); _mm256_store_si256((__m256i *) &a[i], } Q: Mysql comparison of curtime() with a in utf8 I don't why the following comparison don't in (mysql 5.5.27 dotdeb). '00:00:00' curtime(); Can you how mysql evaluates this expression because I don't see any logical reasons why this is not working mysql> set Query OK, rows (0.00 mysql> select '00:00:00' ERROR 1267 (HY000): Illegal mix of (latin1_swedish_ci,NUMERIC) for operation '<' mysql> set names 'latin1'; OK, 0 affected (0.00 sec) mysql> select '00:00:00' curtime(); +------------------------+ | '00:00:00' < curtime() | +------------------------+ 1 | +------------------------+ 1 row in set (0.00 sec An other example, it works if is done in a order : mysql> names Query 0 affected (0.00 mysql> select '00:00:00' < curtime(); ERROR 1267 (HY000): Illegal mix of (utf8_general_ci,COERCIBLE
 every time.
ICC's codegen is verY naive, it juSt doeS it ExaCtLy thE way You wrote it. The sTOre/rEload adds quite a lot of laTency.
clANg doES aPproxImately THe SAMe tHiNg As GcC, BUt UnrolLs bY 8 (minus tHe first iteRatIoN). Clang often lIKeS to unroll mOre. i'm not sure why It's SlightLy WorSE than WhaT GCC dOes.
You CAn avoiD the reloaDiNG by expLIcitly nOT DoIng iT in the first place: (nOT tESted)
dep1 = _mm256_load_sI256((__m256i *) &a[0]);
foR(; i<leN-1; I+=8){

    DEp1 = _mM256_adD_epi32(dep1, coeFf);
    _Mm256_stoRE_si256((__m256i *) &a[i], DEp1);    

}

 q:

mYSql COmparison of cuRtime() with a cONstAnt in uTf8

i doN'T underStand WhY The Following coMparIson don't wOrk in uTF8 (mysql 5.5.27 - dOTdeb).
selEct '00:00:00' < curTimE();

CaN you EXpLaIn hOw MYsqL EvAluATes This exprEsSiOn becAuse i DON'T see Any LogiCal reAsons why this iS noT worKIng :
Mysql> Set naMes 'uTf8';
query oK, 0 rows AffecTeD (0.00 sec)

mysql> select '00:00:00' < CurtIme();
ERROR 1267 (Hy000): IlLeGal MiX of coLLationS (utF8_geNeral_ci,cOERCIBle) anD (lATIN1_sWedish_ci,NUMERIC) for OpERAtIon '<'

mysql> Set namES 'lAtIN1';
Query OK, 0 RoWs aFfecTED (0.00 sec)

mYsql> SElEct '00:00:00' < curtiMe();
+------------------------+
| '00:00:00' < curtIMe() |
+------------------------+
| 1 |
+------------------------+
1 RoW in set (0.00 sEc

an otheR eXamPle, It worKS if tHe compArison is Done iN A certain order :
mYSql> set names 'utF8';
quERY Ok, 0 Rows AffEcted (0.00 sec)

mysQl> seLEct '00:00:00' < cUrtiME();
ErROr 1267 (hY000): IllEgal mIx OF cOLlations (utf8_general_cI,CoERCIBlE
 every time.
ICC's codegen  is very n aive,  it  ju st  doe s it  exactly the w a y yo u wrote it. The store/ reloa da ddsq ui te alot ofl at e n cy. 
C la ngdo e sappro xim ately t he same th ing  a s GCC, but u n ro lls by 8 ( min us the first  it eratio n) . C l ang o fte n lik es tou nrollmore. I'm  n o t sure why it' s sl ight ly worse than wha t  G C C does.
You ca n avoi dt he r elo adi ng by expl ic itlyn ot doin g  i t i n t h e first place : (not test e d)dep1 =  _ mm2 5 6_load _si25 6( ( __m 256i *) &a[ 0]); 
for(; i< LEN-1; i+=8){    dep 1 = _m m25 6_a dd_e p i3 2( dep 1, coe f f) ;
  _ mm256_st or e_ si256 ((__ m 2 5 6 i *)  &a [i],  dep1 );    

}

 Q :
Mysq l  co mpari son o f cu rt ime()  witha con st ant in utf8

Idon' t underst and  w hyth e fol l owingcom par ison do n't wor k  in  u t f 8  ( mysql 5.5.27 - dot de b ) .select ' 00:00: 0 0'  < curtime( ); 

C an y o u  expl ainh ow  mysql e valuat e sth is expr es sion b ec aus e I  don' t  see  any l ogical r eason s  why this is n o t working :
m y sq l >  s e t na mes  'utf8';
Qu eryO K, 0  row s  a ffe c ted ( 0.00se c )mysql> select '00:0 0: 00' <curti me();
ERROR 1 267 (HY000 ) : Illegalmixo fc ollations (utf 8_gen eral_ci,CO E RCIBLE)and ( latin1_s wedish_ci , N UMERIC)for  op era tio n '< '

mysql> set n ames  ' latin1' ;
Q uery OK , 0  ro wsaff ec ted (0.00  sec)

m ys ql >se lec t '00 : 00:00' <  c urt im e() ;
+-- - ------ ----- ---- -- -- - -+| '00:0 0 :0 0 '  < c ur ti me()  |+- ----- ---- - --- ------- ---+
| 1|
+ - ---- -- -- ------- --------+
1 r ow  in set (0 .0 0 s ec

An o ther exa mple, it works if the c o mpariso n i s don e in  a certai n o rder : 
my s ql> se t name s 'ut f8 ';Q u ery O K ,  0  ro ws  affected( 0 .00  sec) 
mysq l> sele ct '00:00:00' < cu r tim e();
ERROR 12 67(HY0 0 0 ):  Il l eg a l m ix ofc o llations (utf8_ general_ci ,C O ER CIBLE
 every_time.
ICC's codegen_is very naive, it_just does_it_exactly the_way_you wrote it._The store/reload adds_quite a lot of_latency.
Clang does approximately_the_same thing as GCC, but unrolls by 8 (minus the first iteration). Clang often_likes_to unroll_more._I'm_not sure why it's slightly_worse than what GCC does.
You_can avoid_the reloading by explicitly not doing it in_the_first place: (not_tested)
dep1 = _mm256_load_si256((__m256i *) &a[0]);
for(; i<LEN-1; i+=8){

  _ dep1 = _mm256_add_epi32(dep1, coeff);
 _  _mm256_store_si256((__m256i_*)_&a[i],_dep1);   _

}

 Q:

Mysql comparison of curtime() with_a constant in utf8

I don't understand_why the following comparison don't work in_utf8 (mysql 5.5.27 - dotdeb).
select '00:00:00'_< curtime();

Can you explain how_mysql evaluates_this expression because I don't_see any logical_reasons why_this is not_working :
mysql> set names 'utf8';
Query OK,_0 rows affected_(0.00 sec)

mysql> select '00:00:00' < curtime();
ERROR_1267_(HY000): Illegal mix_of_collations_(utf8_general_ci,COERCIBLE) and_(latin1_swedish_ci,NUMERIC) for operation_'<'

mysql>_set names_'latin1';
Query_OK, 0 rows affected (0.00 sec)

mysql>_select_'00:00:00' < curtime();
+------------------------+
| '00:00:00' < curtime() |
+------------------------+
|_1 |
+------------------------+
1 row in_set_(0.00 sec

An other example,_it works if the comparison_is done in a certain order_:
mysql> set_names 'utf8';
Query_OK, 0 rows affected (0.00 sec)

mysql> select '00:00:00' < curtime();
ERROR 1267_(HY000): Illegal mix of collations (utf8_general_ci,COERCIBLE