diff -ruwb ./sql/log.cc ./sql/log.cc
--- ./sql/log.cc	2020-05-08 09:37:44.000000000 +0200
+++ ./sql/log.cc	2020-06-30 08:33:16.010640088 +0200
@@ -8657,17 +8657,20 @@
 
   mysql_mutex_lock(&LOCK_error_log);
 
-  skr= my_time(0);
+  timeval my_microtime;
+  gettimeofday(&my_microtime, NULL);
+  skr= my_microtime.tv_sec;  
   localtime_r(&skr, &tm_tmp);
   start=&tm_tmp;
 
-  fprintf(stderr, "%d-%02d-%02d %2d:%02d:%02d %lu [%s] %.*s%.*s\n",
+  fprintf(stderr, "%d-%02d-%02d %2d:%02d:%02d.%06ld %lu [%s] %.*s%.*s\n",
           start->tm_year + 1900,
           start->tm_mon+1,
           start->tm_mday,
           start->tm_hour,
           start->tm_min,
           start->tm_sec,
+          my_microtime.tv_usec,
           (unsigned long) pthread_self(),
           (level == ERROR_LEVEL ? "ERROR" : level == WARNING_LEVEL ?
            "Warning" : "Note"),
diff -ruwb ./sql/sql_view.cc ./sql/sql_view.cc
--- ./sql/sql_view.cc	2020-05-08 09:37:44.000000000 +0200
+++ ./sql/sql_view.cc	2020-07-01 12:38:46.949327565 +0200
@@ -35,6 +35,7 @@
 #include "sp_cache.h"
 #include "datadict.h"   // dd_frm_is_view()
 #include "sql_derived.h"
+#include <map>
 
 #define MD5_BUFF_LENGTH 33
 
@@ -122,14 +123,25 @@
     TRUE  duplicate names are found and they can't be converted or conversion
           isn't allowed
 */
-
+int ncomp = 0;
 bool check_duplicate_names(List<Item> &item_list, bool gen_unique_view_name)
 {
+  sql_print_information("check_duplicate_names() for %i elements", item_list.elements);
+  //if (item_list.elements > 100) {
+  //DBUG_RETURN(check_duplicate_names_map_lookup(item_list, gen_unique_view_name));
+    check_duplicate_names_map_lookup(item_list, gen_unique_view_name);
+    //}
+
   Item *item;
   List_iterator_fast<Item> it(item_list);
   List_iterator_fast<Item> itc(item_list);
   DBUG_ENTER("check_duplicate_names");
 
+  ncomp = 0;
+  timeval my_microtime;
+  gettimeofday(&my_microtime, NULL);
+  int start = my_microtime.tv_usec;
+
   while ((item= it++))
   {
     Item *check;
@@ -137,8 +149,10 @@
     if (item->real_item()->type() == Item::FIELD_ITEM)
       item->is_autogenerated_name= FALSE;
     itc.rewind();
+
     while ((check= itc++) && check != item)
     {
+      ncomp++;
       if (my_strcasecmp(system_charset_info, item->name, check->name) == 0)
       {
         if (!gen_unique_view_name)
@@ -152,6 +166,10 @@
       }
     }
   }
+  gettimeofday(&my_microtime, NULL);
+
+  sql_print_information("while{while{}} %i µs, %i my_strcasecmp() invocations", my_microtime.tv_usec - start, ncomp);
+  
   DBUG_RETURN(FALSE);
 
 err:
@@ -159,6 +177,59 @@
   DBUG_RETURN(TRUE);
 }
 
+bool check_duplicate_names_map_lookup(List<Item> &item_list, bool gen_unique_view_name)
+{
+  Item *item;
+  Item *check;
+  List_iterator_fast<Item> it(item_list);
+  struct insensitive { 
+    bool operator() (const char* item_name, const char* check_name) const {
+      ncomp++;
+      return my_strcasecmp(system_charset_info, item_name, check_name) < 0;
+    }
+  };
+  std::map<char*, Item *, insensitive> names_map;
+
+  DBUG_ENTER("check_duplicate_names");
+
+  timeval my_microtime;
+  gettimeofday(&my_microtime, NULL);
+  int start = my_microtime.tv_usec;
+  ncomp = 0;
+
+  while ((item= it++))
+  {
+    /* treat underlying fields like set by user names */
+    if (item->real_item()->type() == Item::FIELD_ITEM)
+      item->is_autogenerated_name= FALSE;
+    
+    check = names_map.insert(std::make_pair(item->name, item)).first->second;
+    if (check != item) {
+      if (!gen_unique_view_name)
+        goto err;
+
+      if (item->is_autogenerated_name)
+        make_unique_view_field_name(item, item_list, item);
+      else if (check->is_autogenerated_name)
+        {
+          names_map.erase(check->name);
+          make_unique_view_field_name(check, item_list, item);
+          names_map[check->name] = check;
+        }
+      else
+        goto err;
+    }
+  }
+
+  gettimeofday(&my_microtime, NULL);
+  sql_print_information("std::map %i µs, %i my_strcasecmp() invocations", my_microtime.tv_usec - start, ncomp);
+  DBUG_RETURN(FALSE);
+
+err:
+  names_map.clear();
+  //my_error(ER_DUP_FIELDNAME, MYF(0), item->name);
+  DBUG_RETURN(TRUE);
+}
 
 /**
   Check if auto generated column names are conforming and
diff -ruwb ./sql/sql_view.h ./sql/sql_view.h
--- ./sql/sql_view.h	2020-05-08 09:37:44.000000000 +0200
+++ ./sql/sql_view.h	2020-07-01 12:36:38.287716580 +0200
@@ -52,6 +52,7 @@
 extern TYPELIB updatable_views_with_limit_typelib;
 
 bool check_duplicate_names(List<Item>& item_list, bool gen_unique_view_names);
+bool check_duplicate_names_map_lookup(List<Item>& item_list, bool gen_unique_view_names);
 bool mysql_rename_view(THD *thd, const char *new_db, const char *new_name,
                        TABLE_LIST *view);
