All of lore.kernel.org
 help / color / mirror / Atom feed
* [Code] Fastest String Search Algorithm.
@ 2021-06-13  8:30 Amit Choudhary
  2021-06-13 10:05 ` Bhaskar Chowdhury
  0 siblings, 1 reply; 6+ messages in thread
From: Amit Choudhary @ 2021-06-13  8:30 UTC (permalink / raw)
  To: linux-kernel

Hi All,

I have invented a new string search algorithm. It has performed better
than strstr(), Boyer-Moore, and KPM algorithms.

But I am not sending my code so that my algorithm gets included in linux kernel.

I am sending this code because linux kernel mailing list is in public
domain and getting indexed by search engines. So, people can see this
algo if they search for fastest string search algorithm on web.

Code:

===================================================================================

// Choudhary string search algorithm
static char * choudhary_string_search_algorithm(char *text, char *pattern)
{

#define false 0
#define true 1
#define ALPHABET_SIZE 256

    int i = 0;
    int end_index = 0;
    int not_found = false;

    char pattern_char[ALPHABET_SIZE] = {0};

    int text_len = strlen(text);
    int pattern_len = strlen(pattern);

    int pi_44 = pattern_len - 1;
    int pi_34 = (3 * pattern_len) / 4;
    int pi_24 = pattern_len / 2;
    int pi_14 = pattern_len / 4;

    int last_failed_index = -1;

    // preprocessing
    for (i = 0; i < pattern_len; i++) {
        pattern_char[(int)(pattern[i])] = 1;
    }

    // now search
    for (i = 0; i < text_len; i++) {

        if ((text_len - i) < pattern_len) {
            return NULL;
            //return -1;
        }

        if (pattern[pi_44] != text[i + pi_44]) {

            last_failed_index = pi_44;

            // this character doesn't appear in pattern, so skip
            if (pattern_char[(int)(text[i + pi_44])] == 0) {
                i = i + pi_44;
            }

            continue;

        } else if (pattern[pi_34] != text[i + pi_34]) {

            last_failed_index = pi_34;

            // this character doesn't appear in pattern, so skip
            if (pattern_char[(int)(text[i + pi_34])] == 0) {
                i = i + pi_34;
            }

            continue;

        } else if (pattern[pi_24] != text[i + pi_24]) {

            last_failed_index = pi_24;

            // this character doesn't appear in pattern, so skip
            if (pattern_char[(int)(text[i + pi_24])] == 0) {
                i = i + pi_24;
            }

            continue;

        } else if (pattern[pi_14] != text[i + pi_14]) {

            last_failed_index = pi_14;

            // this character doesn't appear in pattern, so skip
            if (pattern_char[(int)(text[i + pi_14])] == 0) {
                i = i + pi_14;
            }

            continue;

        } // end of if-else.. block

        // compare with character at last failed index.
        if (last_failed_index >= 0) {

            if (pattern[last_failed_index] != text[i + last_failed_index]) {
                continue;
            }

        }

        if (pattern[0] == text[i]) {

            //full_pattern_search = full_pattern_search + 1;
            end_index = i + pi_44;
            not_found = false;
            int index = 0;

            for (index = i; index <= end_index; index++) {
                if (text[index] != pattern[index - i]) {
                    last_failed_index = index - i;
                    not_found = true;
                    break;
                }
            } // end of inner for loop

            if (not_found == false) { // match is found
                return (text + i);
                //return i;
            } else if (pattern_char[(int)(text[index])] == 0) {
                i = index;
            }
        } // end of if pattern[0]

    } // end of outer for loop

    return NULL;
    //return -1;

} // end of choudhary_string_search_algorithm

===================================================================================

Regards,
Amit

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Code] Fastest String Search Algorithm.
  2021-06-13  8:30 [Code] Fastest String Search Algorithm Amit Choudhary
@ 2021-06-13 10:05 ` Bhaskar Chowdhury
  2021-06-13 10:30   ` Amit Choudhary
       [not found]   ` <CAFf+5zjn9K-ufRGLQdH9B1OrMEzQdP2M-xPkbuss9Uq0c82Z5w@mail.gmail.com>
  0 siblings, 2 replies; 6+ messages in thread
From: Bhaskar Chowdhury @ 2021-06-13 10:05 UTC (permalink / raw)
  To: Amit Choudhary; +Cc: LinuxKernel

[-- Attachment #1: Type: text/plain, Size: 4460 bytes --]

On 14:00 Sun 13 Jun 2021, Amit Choudhary wrote:

Ahhhhhhhh...

Oh crap! Get off the lawn , kiddo. Do NOT USE THIS PLACE for your obnoxious
desire.

We don't have time and energy to evaluate some airy-fairy stuff .

How do you know we will ever bother to think about "include your code"?? Let
alone other factor...huh...you are living in fool's paradise ...meh... look
like your head is filled with lots of preconceived dogma....where have you got
those?? Heck..

Your intention is not wise...this mailing list solely exist for people
interested in Linux and only in Linux Kernel. Period.

IOW , PLEASE DO NOT BOTHER US.

~Bhaskar

>Hi All,
>
>I have invented a new string search algorithm. It has performed better
>than strstr(), Boyer-Moore, and KPM algorithms.
>
>But I am not sending my code so that my algorithm gets included in linux kernel.
>
>I am sending this code because linux kernel mailing list is in public
>domain and getting indexed by search engines. So, people can see this
>algo if they search for fastest string search algorithm on web.
>
>Code:
>
>===================================================================================
>
>// Choudhary string search algorithm
>static char * choudhary_string_search_algorithm(char *text, char *pattern)
>{
>
>#define false 0
>#define true 1
>#define ALPHABET_SIZE 256
>
>    int i = 0;
>    int end_index = 0;
>    int not_found = false;
>
>    char pattern_char[ALPHABET_SIZE] = {0};
>
>    int text_len = strlen(text);
>    int pattern_len = strlen(pattern);
>
>    int pi_44 = pattern_len - 1;
>    int pi_34 = (3 * pattern_len) / 4;
>    int pi_24 = pattern_len / 2;
>    int pi_14 = pattern_len / 4;
>
>    int last_failed_index = -1;
>
>    // preprocessing
>    for (i = 0; i < pattern_len; i++) {
>        pattern_char[(int)(pattern[i])] = 1;
>    }
>
>    // now search
>    for (i = 0; i < text_len; i++) {
>
>        if ((text_len - i) < pattern_len) {
>            return NULL;
>            //return -1;
>        }
>
>        if (pattern[pi_44] != text[i + pi_44]) {
>
>            last_failed_index = pi_44;
>
>            // this character doesn't appear in pattern, so skip
>            if (pattern_char[(int)(text[i + pi_44])] == 0) {
>                i = i + pi_44;
>            }
>
>            continue;
>
>        } else if (pattern[pi_34] != text[i + pi_34]) {
>
>            last_failed_index = pi_34;
>
>            // this character doesn't appear in pattern, so skip
>            if (pattern_char[(int)(text[i + pi_34])] == 0) {
>                i = i + pi_34;
>            }
>
>            continue;
>
>        } else if (pattern[pi_24] != text[i + pi_24]) {
>
>            last_failed_index = pi_24;
>
>            // this character doesn't appear in pattern, so skip
>            if (pattern_char[(int)(text[i + pi_24])] == 0) {
>                i = i + pi_24;
>            }
>
>            continue;
>
>        } else if (pattern[pi_14] != text[i + pi_14]) {
>
>            last_failed_index = pi_14;
>
>            // this character doesn't appear in pattern, so skip
>            if (pattern_char[(int)(text[i + pi_14])] == 0) {
>                i = i + pi_14;
>            }
>
>            continue;
>
>        } // end of if-else.. block
>
>        // compare with character at last failed index.
>        if (last_failed_index >= 0) {
>
>            if (pattern[last_failed_index] != text[i + last_failed_index]) {
>                continue;
>            }
>
>        }
>
>        if (pattern[0] == text[i]) {
>
>            //full_pattern_search = full_pattern_search + 1;
>            end_index = i + pi_44;
>            not_found = false;
>            int index = 0;
>
>            for (index = i; index <= end_index; index++) {
>                if (text[index] != pattern[index - i]) {
>                    last_failed_index = index - i;
>                    not_found = true;
>                    break;
>                }
>            } // end of inner for loop
>
>            if (not_found == false) { // match is found
>                return (text + i);
>                //return i;
>            } else if (pattern_char[(int)(text[index])] == 0) {
>                i = index;
>            }
>        } // end of if pattern[0]
>
>    } // end of outer for loop
>
>    return NULL;
>    //return -1;
>
>} // end of choudhary_string_search_algorithm
>
>===================================================================================
>
>Regards,
>Amit

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Code] Fastest String Search Algorithm.
  2021-06-13 10:05 ` Bhaskar Chowdhury
@ 2021-06-13 10:30   ` Amit Choudhary
       [not found]   ` <CAFf+5zjn9K-ufRGLQdH9B1OrMEzQdP2M-xPkbuss9Uq0c82Z5w@mail.gmail.com>
  1 sibling, 0 replies; 6+ messages in thread
From: Amit Choudhary @ 2021-06-13 10:30 UTC (permalink / raw)
  To: Bhaskar Chowdhury, Amit Choudhary, LinuxKernel

Bhaskar,

Fuck you.

You are not the owner of linux kernel.

You are a very big idiot.

You really don't know who you are talking to.

You are just assuming that I am a stupid guy without knowing anything about me.

My linux kernel patches are in linux kernel since 2005-2006.

What are your educational and professional qualifications?

I don't think you are from IIT like me, probably you are from a third
grade donation based college.

I have invented a new search engine architecture and implemented it
and it is hosted on sourceforge.

Have you ever invented anything?

World is full of idiots like you from India who think that they are
supreme and other Indians are fools.

Amit



On Sun, Jun 13, 2021, 3:35 PM Bhaskar Chowdhury <unixbhaskar@gmail.com> wrote:
>
> On 14:00 Sun 13 Jun 2021, Amit Choudhary wrote:
>
> Ahhhhhhhh...
>
> Oh crap! Get off the lawn , kiddo. Do NOT USE THIS PLACE for your obnoxious
> desire.
>
> We don't have time and energy to evaluate some airy-fairy stuff .
>
> How do you know we will ever bother to think about "include your code"?? Let
> alone other factor...huh...you are living in fool's paradise ...meh... look
> like your head is filled with lots of preconceived dogma....where have you got
> those?? Heck..
>
> Your intention is not wise...this mailing list solely exist for people
> interested in Linux and only in Linux Kernel. Period.
>
> IOW , PLEASE DO NOT BOTHER US.
>
> ~Bhaskar
>
> >Hi All,
> >
> >I have invented a new string search algorithm. It has performed better
> >than strstr(), Boyer-Moore, and KPM algorithms.
> >
> >But I am not sending my code so that my algorithm gets included in linux kernel.
> >
> >I am sending this code because linux kernel mailing list is in public
> >domain and getting indexed by search engines. So, people can see this
> >algo if they search for fastest string search algorithm on web.
> >
> >Code:
> >
> >===================================================================================
> >
> >// Choudhary string search algorithm
> >static char * choudhary_string_search_algorithm(char *text, char *pattern)
> >{
> >
> >#define false 0
> >#define true 1
> >#define ALPHABET_SIZE 256
> >
> >    int i = 0;
> >    int end_index = 0;
> >    int not_found = false;
> >
> >    char pattern_char[ALPHABET_SIZE] = {0};
> >
> >    int text_len = strlen(text);
> >    int pattern_len = strlen(pattern);
> >
> >    int pi_44 = pattern_len - 1;
> >    int pi_34 = (3 * pattern_len) / 4;
> >    int pi_24 = pattern_len / 2;
> >    int pi_14 = pattern_len / 4;
> >
> >    int last_failed_index = -1;
> >
> >    // preprocessing
> >    for (i = 0; i < pattern_len; i++) {
> >        pattern_char[(int)(pattern[i])] = 1;
> >    }
> >
> >    // now search
> >    for (i = 0; i < text_len; i++) {
> >
> >        if ((text_len - i) < pattern_len) {
> >            return NULL;
> >            //return -1;
> >        }
> >
> >        if (pattern[pi_44] != text[i + pi_44]) {
> >
> >            last_failed_index = pi_44;
> >
> >            // this character doesn't appear in pattern, so skip
> >            if (pattern_char[(int)(text[i + pi_44])] == 0) {
> >                i = i + pi_44;
> >            }
> >
> >            continue;
> >
> >        } else if (pattern[pi_34] != text[i + pi_34]) {
> >
> >            last_failed_index = pi_34;
> >
> >            // this character doesn't appear in pattern, so skip
> >            if (pattern_char[(int)(text[i + pi_34])] == 0) {
> >                i = i + pi_34;
> >            }
> >
> >            continue;
> >
> >        } else if (pattern[pi_24] != text[i + pi_24]) {
> >
> >            last_failed_index = pi_24;
> >
> >            // this character doesn't appear in pattern, so skip
> >            if (pattern_char[(int)(text[i + pi_24])] == 0) {
> >                i = i + pi_24;
> >            }
> >
> >            continue;
> >
> >        } else if (pattern[pi_14] != text[i + pi_14]) {
> >
> >            last_failed_index = pi_14;
> >
> >            // this character doesn't appear in pattern, so skip
> >            if (pattern_char[(int)(text[i + pi_14])] == 0) {
> >                i = i + pi_14;
> >            }
> >
> >            continue;
> >
> >        } // end of if-else.. block
> >
> >        // compare with character at last failed index.
> >        if (last_failed_index >= 0) {
> >
> >            if (pattern[last_failed_index] != text[i + last_failed_index]) {
> >                continue;
> >            }
> >
> >        }
> >
> >        if (pattern[0] == text[i]) {
> >
> >            //full_pattern_search = full_pattern_search + 1;
> >            end_index = i + pi_44;
> >            not_found = false;
> >            int index = 0;
> >
> >            for (index = i; index <= end_index; index++) {
> >                if (text[index] != pattern[index - i]) {
> >                    last_failed_index = index - i;
> >                    not_found = true;
> >                    break;
> >                }
> >            } // end of inner for loop
> >
> >            if (not_found == false) { // match is found
> >                return (text + i);
> >                //return i;
> >            } else if (pattern_char[(int)(text[index])] == 0) {
> >                i = index;
> >            }
> >        } // end of if pattern[0]
> >
> >    } // end of outer for loop
> >
> >    return NULL;
> >    //return -1;
> >
> >} // end of choudhary_string_search_algorithm
> >
> >===================================================================================
> >
> >Regards,
> >Amit

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Code] Fastest String Search Algorithm.
       [not found]   ` <CAFf+5zjn9K-ufRGLQdH9B1OrMEzQdP2M-xPkbuss9Uq0c82Z5w@mail.gmail.com>
@ 2021-06-13 10:34     ` Bhaskar Chowdhury
  2021-06-13 10:46       ` Amit Choudhary
  0 siblings, 1 reply; 6+ messages in thread
From: Bhaskar Chowdhury @ 2021-06-13 10:34 UTC (permalink / raw)
  To: Amit Choudhary; +Cc: LinuxKernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=UTF-8; format=flowed, Size: 7151 bytes --]

On 15:47 Sun 13 Jun 2021, Amit Choudhary wrote:

Woohooo , kiddo.... you told me where exactly you came from.

  You are now ignored....blocked ...feel really sorry for you.



>   Bhaskar,
>   Fuck you.
>   You are not the owner of linux kernel.
>   You are a very big idiot.
>   You really don't know who you are talking to.
>   You are just assuming that I am a stupid guy without knowing anything
>   about me.
>   My linux kernel patches are in linux kernel since 2005-2006.
>   What are your educational and professional qualifications?
>   I don't think you are from IIT like me, probably you are from a third
>   grade donation based college.
>   I have invented a new search engine architecture and implemented it and
>   it is hosted on sourceforge.
>   Have you ever invented anything?
>   World is full of idiots like you from India who think that they are
>   supreme and everyone else is a fool.
>   Amit
>   On Sun, Jun 13, 2021, 3:35 PM Bhaskar Chowdhury
>   <[1]unixbhaskar@gmail.com> wrote:
>
>     On 14:00 Sun 13 Jun 2021, Amit Choudhary wrote:
>     Ahhhhhhhh...
>     Oh crap! Get off the lawn , kiddo. Do NOT USE THIS PLACE for your
>     obnoxious
>     desire.
>     We don't have time and energy to evaluate some airy-fairy stuff .
>     How do you know we will ever bother to think about "include your
>     code"?? Let
>     alone other factor...huh...you are living in fool's paradise
>     ...meh... look
>     like your head is filled with lots of preconceived dogma....where
>     have you got
>     those?? Heck..
>     Your intention is not wise...this mailing list solely exist for
>     people
>     interested in Linux and only in Linux Kernel. Period.
>     IOW , PLEASE DO NOT BOTHER US.
>     ~Bhaskar
>     >Hi All,
>     >
>     >I have invented a new string search algorithm. It has performed
>     better
>     >than strstr(), Boyer-Moore, and KPM algorithms.
>     >
>     >But I am not sending my code so that my algorithm gets included in
>     linux kernel.
>     >
>     >I am sending this code because linux kernel mailing list is in
>     public
>     >domain and getting indexed by search engines. So, people can see
>     this
>     >algo if they search for fastest string search algorithm on web.
>     >
>     >Code:
>     >
>     >===================================================================
>     ================
>     >
>     >// Choudhary string search algorithm
>     >static char * choudhary_string_search_algorithm(char *text, char
>     *pattern)
>     >{
>     >
>     >#define false 0
>     >#define true 1
>     >#define ALPHABET_SIZE 256
>     >
>     >Â  Â  int i = 0;
>     >Â  Â  int end_index = 0;
>     >Â  Â  int not_found = false;
>     >
>     >Â  Â  char pattern_char[ALPHABET_SIZE] = {0};
>     >
>     >Â  Â  int text_len = strlen(text);
>     >Â  Â  int pattern_len = strlen(pattern);
>     >
>     >Â  Â  int pi_44 = pattern_len - 1;
>     >Â  Â  int pi_34 = (3 * pattern_len) / 4;
>     >Â  Â  int pi_24 = pattern_len / 2;
>     >Â  Â  int pi_14 = pattern_len / 4;
>     >
>     >Â  Â  int last_failed_index = -1;
>     >
>     >Â  Â  // preprocessing
>     >Â  Â  for (i = 0; i < pattern_len; i++) {
>     >Â  Â  Â  Â  pattern_char[(int)(pattern[i])] = 1;
>     >Â  Â  }
>     >
>     >Â  Â  // now search
>     >Â  Â  for (i = 0; i < text_len; i++) {
>     >
>     >Â  Â  Â  Â  if ((text_len - i) < pattern_len) {
>     >Â  Â  Â  Â  Â  Â  return NULL;
>     >Â  Â  Â  Â  Â  Â  //return -1;
>     >Â  Â  Â  Â  }
>     >
>     >Â  Â  Â  Â  if (pattern[pi_44] != text[i + pi_44]) {
>     >
>     >Â  Â  Â  Â  Â  Â  last_failed_index = pi_44;
>     >
>     >Â  Â  Â  Â  Â  Â  // this character doesn't appear in pattern, so
>     skip
>     >Â  Â  Â  Â  Â  Â  if (pattern_char[(int)(text[i + pi_44])] == 0) {
>     >Â  Â  Â  Â  Â  Â  Â  Â  i = i + pi_44;
>     >Â  Â  Â  Â  Â  Â  }
>     >
>     >Â  Â  Â  Â  Â  Â  continue;
>     >
>     >Â  Â  Â  Â  } else if (pattern[pi_34] != text[i + pi_34]) {
>     >
>     >Â  Â  Â  Â  Â  Â  last_failed_index = pi_34;
>     >
>     >Â  Â  Â  Â  Â  Â  // this character doesn't appear in pattern, so
>     skip
>     >Â  Â  Â  Â  Â  Â  if (pattern_char[(int)(text[i + pi_34])] == 0) {
>     >Â  Â  Â  Â  Â  Â  Â  Â  i = i + pi_34;
>     >Â  Â  Â  Â  Â  Â  }
>     >
>     >Â  Â  Â  Â  Â  Â  continue;
>     >
>     >Â  Â  Â  Â  } else if (pattern[pi_24] != text[i + pi_24]) {
>     >
>     >Â  Â  Â  Â  Â  Â  last_failed_index = pi_24;
>     >
>     >Â  Â  Â  Â  Â  Â  // this character doesn't appear in pattern, so
>     skip
>     >Â  Â  Â  Â  Â  Â  if (pattern_char[(int)(text[i + pi_24])] == 0) {
>     >Â  Â  Â  Â  Â  Â  Â  Â  i = i + pi_24;
>     >Â  Â  Â  Â  Â  Â  }
>     >
>     >Â  Â  Â  Â  Â  Â  continue;
>     >
>     >Â  Â  Â  Â  } else if (pattern[pi_14] != text[i + pi_14]) {
>     >
>     >Â  Â  Â  Â  Â  Â  last_failed_index = pi_14;
>     >
>     >Â  Â  Â  Â  Â  Â  // this character doesn't appear in pattern, so
>     skip
>     >Â  Â  Â  Â  Â  Â  if (pattern_char[(int)(text[i + pi_14])] == 0) {
>     >Â  Â  Â  Â  Â  Â  Â  Â  i = i + pi_14;
>     >Â  Â  Â  Â  Â  Â  }
>     >
>     >Â  Â  Â  Â  Â  Â  continue;
>     >
>     >Â  Â  Â  Â  } // end of if-else.. block
>     >
>     >Â  Â  Â  Â  // compare with character at last failed index.
>     >Â  Â  Â  Â  if (last_failed_index >= 0) {
>     >
>     >Â  Â  Â  Â  Â  Â  if (pattern[last_failed_index] != text[i +
>     last_failed_index]) {
>     >Â  Â  Â  Â  Â  Â  Â  Â  continue;
>     >Â  Â  Â  Â  Â  Â  }
>     >
>     >Â  Â  Â  Â  }
>     >
>     >Â  Â  Â  Â  if (pattern[0] == text[i]) {
>     >
>     >Â  Â  Â  Â  Â  Â  //full_pattern_search = full_pattern_search + 1;
>     >Â  Â  Â  Â  Â  Â  end_index = i + pi_44;
>     >Â  Â  Â  Â  Â  Â  not_found = false;
>     >Â  Â  Â  Â  Â  Â  int index = 0;
>     >
>     >Â  Â  Â  Â  Â  Â  for (index = i; index <= end_index; index++) {
>     >Â  Â  Â  Â  Â  Â  Â  Â  if (text[index] != pattern[index - i]) {
>     >Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  last_failed_index = index - i;
>     >Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  not_found = true;
>     >Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  break;
>     >Â  Â  Â  Â  Â  Â  Â  Â  }
>     >Â  Â  Â  Â  Â  Â  } // end of inner for loop
>     >
>     >Â  Â  Â  Â  Â  Â  if (not_found == false) { // match is found
>     >Â  Â  Â  Â  Â  Â  Â  Â  return (text + i);
>     >Â  Â  Â  Â  Â  Â  Â  Â  //return i;
>     >Â  Â  Â  Â  Â  Â  } else if (pattern_char[(int)(text[index])] == 0)
>     {
>     >Â  Â  Â  Â  Â  Â  Â  Â  i = index;
>     >Â  Â  Â  Â  Â  Â  }
>     >Â  Â  Â  Â  } // end of if pattern[0]
>     >
>     >Â  Â  } // end of outer for loop
>     >
>     >Â  Â  return NULL;
>     >Â  Â  //return -1;
>     >
>     >} // end of choudhary_string_search_algorithm
>     >
>     >===================================================================
>     ================
>     >
>     >Regards,
>     >Amit
>
>References
>
>   1. mailto:unixbhaskar@gmail.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Code] Fastest String Search Algorithm.
  2021-06-13 10:34     ` Bhaskar Chowdhury
@ 2021-06-13 10:46       ` Amit Choudhary
  2021-06-13 10:58         ` Bhaskar Chowdhury
  0 siblings, 1 reply; 6+ messages in thread
From: Amit Choudhary @ 2021-06-13 10:46 UTC (permalink / raw)
  To: Bhaskar Chowdhury, Amit Choudhary, LinuxKernel

It looks like you are already blocked by many people and maintainers.

Looking at this https://lkml.org/lkml/2021/3/29/1977 , it is clear
that there are CoC complaints against you.

Amit


On Sun, Jun 13, 2021 at 4:04 PM Bhaskar Chowdhury <unixbhaskar@gmail.com> wrote:
>
> On 15:47 Sun 13 Jun 2021, Amit Choudhary wrote:
>
> Woohooo , kiddo.... you told me where exactly you came from.
>
>   You are now ignored....blocked ...feel really sorry for you.
>
>
>
> >   Bhaskar,
> >   Fuck you.
> >   You are not the owner of linux kernel.
> >   You are a very big idiot.
> >   You really don't know who you are talking to.
> >   You are just assuming that I am a stupid guy without knowing anything
> >   about me.
> >   My linux kernel patches are in linux kernel since 2005-2006.
> >   What are your educational and professional qualifications?
> >   I don't think you are from IIT like me, probably you are from a third
> >   grade donation based college.
> >   I have invented a new search engine architecture and implemented it and
> >   it is hosted on sourceforge.
> >   Have you ever invented anything?
> >   World is full of idiots like you from India who think that they are
> >   supreme and everyone else is a fool.
> >   Amit
> >   On Sun, Jun 13, 2021, 3:35 PM Bhaskar Chowdhury
> >   <[1]unixbhaskar@gmail.com> wrote:
> >
> >     On 14:00 Sun 13 Jun 2021, Amit Choudhary wrote:
> >     Ahhhhhhhh...
> >     Oh crap! Get off the lawn , kiddo. Do NOT USE THIS PLACE for your
> >     obnoxious
> >     desire.
> >     We don't have time and energy to evaluate some airy-fairy stuff .
> >     How do you know we will ever bother to think about "include your
> >     code"?? Let
> >     alone other factor...huh...you are living in fool's paradise
> >     ...meh... look
> >     like your head is filled with lots of preconceived dogma....where
> >     have you got
> >     those?? Heck..
> >     Your intention is not wise...this mailing list solely exist for
> >     people
> >     interested in Linux and only in Linux Kernel. Period.
> >     IOW , PLEASE DO NOT BOTHER US.
> >     ~Bhaskar
> >     >Hi All,
> >     >
> >     >I have invented a new string search algorithm. It has performed
> >     better
> >     >than strstr(), Boyer-Moore, and KPM algorithms.
> >     >
> >     >But I am not sending my code so that my algorithm gets included in
> >     linux kernel.
> >     >
> >     >I am sending this code because linux kernel mailing list is in
> >     public
> >     >domain and getting indexed by search engines. So, people can see
> >     this
> >     >algo if they search for fastest string search algorithm on web.
> >     >
> >     >Code:
> >     >
> >     >===================================================================
> >     ================
> >     >
> >     >// Choudhary string search algorithm
> >     >static char * choudhary_string_search_algorithm(char *text, char
> >     *pattern)
> >     >{
> >     >
> >     >#define false 0
> >     >#define true 1
> >     >#define ALPHABET_SIZE 256
> >     >
> >     >Â  Â  int i = 0;
> >     >Â  Â  int end_index = 0;
> >     >Â  Â  int not_found = false;
> >     >
> >     >Â  Â  char pattern_char[ALPHABET_SIZE] = {0};
> >     >
> >     >Â  Â  int text_len = strlen(text);
> >     >Â  Â  int pattern_len = strlen(pattern);
> >     >
> >     >Â  Â  int pi_44 = pattern_len - 1;
> >     >Â  Â  int pi_34 = (3 * pattern_len) / 4;
> >     >Â  Â  int pi_24 = pattern_len / 2;
> >     >Â  Â  int pi_14 = pattern_len / 4;
> >     >
> >     >Â  Â  int last_failed_index = -1;
> >     >
> >     >Â  Â  // preprocessing
> >     >Â  Â  for (i = 0; i < pattern_len; i++) {
> >     >Â  Â  Â  Â  pattern_char[(int)(pattern[i])] = 1;
> >     >Â  Â  }
> >     >
> >     >Â  Â  // now search
> >     >Â  Â  for (i = 0; i < text_len; i++) {
> >     >
> >     >Â  Â  Â  Â  if ((text_len - i) < pattern_len) {
> >     >Â  Â  Â  Â  Â  Â  return NULL;
> >     >Â  Â  Â  Â  Â  Â  //return -1;
> >     >Â  Â  Â  Â  }
> >     >
> >     >Â  Â  Â  Â  if (pattern[pi_44] != text[i + pi_44]) {
> >     >
> >     >Â  Â  Â  Â  Â  Â  last_failed_index = pi_44;
> >     >
> >     >Â  Â  Â  Â  Â  Â  // this character doesn't appear in pattern, so
> >     skip
> >     >Â  Â  Â  Â  Â  Â  if (pattern_char[(int)(text[i + pi_44])] == 0) {
> >     >Â  Â  Â  Â  Â  Â  Â  Â  i = i + pi_44;
> >     >Â  Â  Â  Â  Â  Â  }
> >     >
> >     >Â  Â  Â  Â  Â  Â  continue;
> >     >
> >     >Â  Â  Â  Â  } else if (pattern[pi_34] != text[i + pi_34]) {
> >     >
> >     >Â  Â  Â  Â  Â  Â  last_failed_index = pi_34;
> >     >
> >     >Â  Â  Â  Â  Â  Â  // this character doesn't appear in pattern, so
> >     skip
> >     >Â  Â  Â  Â  Â  Â  if (pattern_char[(int)(text[i + pi_34])] == 0) {
> >     >Â  Â  Â  Â  Â  Â  Â  Â  i = i + pi_34;
> >     >Â  Â  Â  Â  Â  Â  }
> >     >
> >     >Â  Â  Â  Â  Â  Â  continue;
> >     >
> >     >Â  Â  Â  Â  } else if (pattern[pi_24] != text[i + pi_24]) {
> >     >
> >     >Â  Â  Â  Â  Â  Â  last_failed_index = pi_24;
> >     >
> >     >Â  Â  Â  Â  Â  Â  // this character doesn't appear in pattern, so
> >     skip
> >     >Â  Â  Â  Â  Â  Â  if (pattern_char[(int)(text[i + pi_24])] == 0) {
> >     >Â  Â  Â  Â  Â  Â  Â  Â  i = i + pi_24;
> >     >Â  Â  Â  Â  Â  Â  }
> >     >
> >     >Â  Â  Â  Â  Â  Â  continue;
> >     >
> >     >Â  Â  Â  Â  } else if (pattern[pi_14] != text[i + pi_14]) {
> >     >
> >     >Â  Â  Â  Â  Â  Â  last_failed_index = pi_14;
> >     >
> >     >Â  Â  Â  Â  Â  Â  // this character doesn't appear in pattern, so
> >     skip
> >     >Â  Â  Â  Â  Â  Â  if (pattern_char[(int)(text[i + pi_14])] == 0) {
> >     >Â  Â  Â  Â  Â  Â  Â  Â  i = i + pi_14;
> >     >Â  Â  Â  Â  Â  Â  }
> >     >
> >     >Â  Â  Â  Â  Â  Â  continue;
> >     >
> >     >Â  Â  Â  Â  } // end of if-else.. block
> >     >
> >     >Â  Â  Â  Â  // compare with character at last failed index.
> >     >Â  Â  Â  Â  if (last_failed_index >= 0) {
> >     >
> >     >Â  Â  Â  Â  Â  Â  if (pattern[last_failed_index] != text[i +
> >     last_failed_index]) {
> >     >Â  Â  Â  Â  Â  Â  Â  Â  continue;
> >     >Â  Â  Â  Â  Â  Â  }
> >     >
> >     >Â  Â  Â  Â  }
> >     >
> >     >Â  Â  Â  Â  if (pattern[0] == text[i]) {
> >     >
> >     >Â  Â  Â  Â  Â  Â  //full_pattern_search = full_pattern_search + 1;
> >     >Â  Â  Â  Â  Â  Â  end_index = i + pi_44;
> >     >Â  Â  Â  Â  Â  Â  not_found = false;
> >     >Â  Â  Â  Â  Â  Â  int index = 0;
> >     >
> >     >Â  Â  Â  Â  Â  Â  for (index = i; index <= end_index; index++) {
> >     >Â  Â  Â  Â  Â  Â  Â  Â  if (text[index] != pattern[index - i]) {
> >     >Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  last_failed_index = index - i;
> >     >Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  not_found = true;
> >     >Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  break;
> >     >Â  Â  Â  Â  Â  Â  Â  Â  }
> >     >Â  Â  Â  Â  Â  Â  } // end of inner for loop
> >     >
> >     >Â  Â  Â  Â  Â  Â  if (not_found == false) { // match is found
> >     >Â  Â  Â  Â  Â  Â  Â  Â  return (text + i);
> >     >Â  Â  Â  Â  Â  Â  Â  Â  //return i;
> >     >Â  Â  Â  Â  Â  Â  } else if (pattern_char[(int)(text[index])] == 0)
> >     {
> >     >Â  Â  Â  Â  Â  Â  Â  Â  i = index;
> >     >Â  Â  Â  Â  Â  Â  }
> >     >Â  Â  Â  Â  } // end of if pattern[0]
> >     >
> >     >Â  Â  } // end of outer for loop
> >     >
> >     >Â  Â  return NULL;
> >     >Â  Â  //return -1;
> >     >
> >     >} // end of choudhary_string_search_algorithm
> >     >
> >     >===================================================================
> >     ================
> >     >
> >     >Regards,
> >     >Amit
> >
> >References
> >
> >   1. mailto:unixbhaskar@gmail.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Code] Fastest String Search Algorithm.
  2021-06-13 10:46       ` Amit Choudhary
@ 2021-06-13 10:58         ` Bhaskar Chowdhury
  0 siblings, 0 replies; 6+ messages in thread
From: Bhaskar Chowdhury @ 2021-06-13 10:58 UTC (permalink / raw)
  To: Amit Choudhary; +Cc: LinuxKernel

[-- Attachment #1: Type: text/plain, Size: 8538 bytes --]

On 16:16 Sun 13 Jun 2021, Amit Choudhary wrote:

ROFL!!!  Enjoy your victory, kiddo.

>It looks like you are already blocked by many people and maintainers.
>
>Looking at this https://lkml.org/lkml/2021/3/29/1977 , it is clear
>that there are CoC complaints against you.
>
>Amit
>
>
>On Sun, Jun 13, 2021 at 4:04 PM Bhaskar Chowdhury <unixbhaskar@gmail.com> wrote:
>>
>> On 15:47 Sun 13 Jun 2021, Amit Choudhary wrote:
>>
>> Woohooo , kiddo.... you told me where exactly you came from.
>>
>>   You are now ignored....blocked ...feel really sorry for you.
>>
>>
>>
>> >   Bhaskar,
>> >   Fuck you.
>> >   You are not the owner of linux kernel.
>> >   You are a very big idiot.
>> >   You really don't know who you are talking to.
>> >   You are just assuming that I am a stupid guy without knowing anything
>> >   about me.
>> >   My linux kernel patches are in linux kernel since 2005-2006.
>> >   What are your educational and professional qualifications?
>> >   I don't think you are from IIT like me, probably you are from a third
>> >   grade donation based college.
>> >   I have invented a new search engine architecture and implemented it and
>> >   it is hosted on sourceforge.
>> >   Have you ever invented anything?
>> >   World is full of idiots like you from India who think that they are
>> >   supreme and everyone else is a fool.
>> >   Amit
>> >   On Sun, Jun 13, 2021, 3:35 PM Bhaskar Chowdhury
>> >   <[1]unixbhaskar@gmail.com> wrote:
>> >
>> >     On 14:00 Sun 13 Jun 2021, Amit Choudhary wrote:
>> >     Ahhhhhhhh...
>> >     Oh crap! Get off the lawn , kiddo. Do NOT USE THIS PLACE for your
>> >     obnoxious
>> >     desire.
>> >     We don't have time and energy to evaluate some airy-fairy stuff .
>> >     How do you know we will ever bother to think about "include your
>> >     code"?? Let
>> >     alone other factor...huh...you are living in fool's paradise
>> >     ...meh... look
>> >     like your head is filled with lots of preconceived dogma....where
>> >     have you got
>> >     those?? Heck..
>> >     Your intention is not wise...this mailing list solely exist for
>> >     people
>> >     interested in Linux and only in Linux Kernel. Period.
>> >     IOW , PLEASE DO NOT BOTHER US.
>> >     ~Bhaskar
>> >     >Hi All,
>> >     >
>> >     >I have invented a new string search algorithm. It has performed
>> >     better
>> >     >than strstr(), Boyer-Moore, and KPM algorithms.
>> >     >
>> >     >But I am not sending my code so that my algorithm gets included in
>> >     linux kernel.
>> >     >
>> >     >I am sending this code because linux kernel mailing list is in
>> >     public
>> >     >domain and getting indexed by search engines. So, people can see
>> >     this
>> >     >algo if they search for fastest string search algorithm on web.
>> >     >
>> >     >Code:
>> >     >
>> >     >===================================================================
>> >     ================
>> >     >
>> >     >// Choudhary string search algorithm
>> >     >static char * choudhary_string_search_algorithm(char *text, char
>> >     *pattern)
>> >     >{
>> >     >
>> >     >#define false 0
>> >     >#define true 1
>> >     >#define ALPHABET_SIZE 256
>> >     >
>> >     >Â  Â  int i = 0;
>> >     >Â  Â  int end_index = 0;
>> >     >Â  Â  int not_found = false;
>> >     >
>> >     >Â  Â  char pattern_char[ALPHABET_SIZE] = {0};
>> >     >
>> >     >Â  Â  int text_len = strlen(text);
>> >     >Â  Â  int pattern_len = strlen(pattern);
>> >     >
>> >     >Â  Â  int pi_44 = pattern_len - 1;
>> >     >Â  Â  int pi_34 = (3 * pattern_len) / 4;
>> >     >Â  Â  int pi_24 = pattern_len / 2;
>> >     >Â  Â  int pi_14 = pattern_len / 4;
>> >     >
>> >     >Â  Â  int last_failed_index = -1;
>> >     >
>> >     >Â  Â  // preprocessing
>> >     >Â  Â  for (i = 0; i < pattern_len; i++) {
>> >     >Â  Â  Â  Â  pattern_char[(int)(pattern[i])] = 1;
>> >     >Â  Â  }
>> >     >
>> >     >Â  Â  // now search
>> >     >Â  Â  for (i = 0; i < text_len; i++) {
>> >     >
>> >     >Â  Â  Â  Â  if ((text_len - i) < pattern_len) {
>> >     >Â  Â  Â  Â  Â  Â  return NULL;
>> >     >Â  Â  Â  Â  Â  Â  //return -1;
>> >     >Â  Â  Â  Â  }
>> >     >
>> >     >Â  Â  Â  Â  if (pattern[pi_44] != text[i + pi_44]) {
>> >     >
>> >     >Â  Â  Â  Â  Â  Â  last_failed_index = pi_44;
>> >     >
>> >     >Â  Â  Â  Â  Â  Â  // this character doesn't appear in pattern, so
>> >     skip
>> >     >Â  Â  Â  Â  Â  Â  if (pattern_char[(int)(text[i + pi_44])] == 0) {
>> >     >Â  Â  Â  Â  Â  Â  Â  Â  i = i + pi_44;
>> >     >Â  Â  Â  Â  Â  Â  }
>> >     >
>> >     >Â  Â  Â  Â  Â  Â  continue;
>> >     >
>> >     >Â  Â  Â  Â  } else if (pattern[pi_34] != text[i + pi_34]) {
>> >     >
>> >     >Â  Â  Â  Â  Â  Â  last_failed_index = pi_34;
>> >     >
>> >     >Â  Â  Â  Â  Â  Â  // this character doesn't appear in pattern, so
>> >     skip
>> >     >Â  Â  Â  Â  Â  Â  if (pattern_char[(int)(text[i + pi_34])] == 0) {
>> >     >Â  Â  Â  Â  Â  Â  Â  Â  i = i + pi_34;
>> >     >Â  Â  Â  Â  Â  Â  }
>> >     >
>> >     >Â  Â  Â  Â  Â  Â  continue;
>> >     >
>> >     >Â  Â  Â  Â  } else if (pattern[pi_24] != text[i + pi_24]) {
>> >     >
>> >     >Â  Â  Â  Â  Â  Â  last_failed_index = pi_24;
>> >     >
>> >     >Â  Â  Â  Â  Â  Â  // this character doesn't appear in pattern, so
>> >     skip
>> >     >Â  Â  Â  Â  Â  Â  if (pattern_char[(int)(text[i + pi_24])] == 0) {
>> >     >Â  Â  Â  Â  Â  Â  Â  Â  i = i + pi_24;
>> >     >Â  Â  Â  Â  Â  Â  }
>> >     >
>> >     >Â  Â  Â  Â  Â  Â  continue;
>> >     >
>> >     >Â  Â  Â  Â  } else if (pattern[pi_14] != text[i + pi_14]) {
>> >     >
>> >     >Â  Â  Â  Â  Â  Â  last_failed_index = pi_14;
>> >     >
>> >     >Â  Â  Â  Â  Â  Â  // this character doesn't appear in pattern, so
>> >     skip
>> >     >Â  Â  Â  Â  Â  Â  if (pattern_char[(int)(text[i + pi_14])] == 0) {
>> >     >Â  Â  Â  Â  Â  Â  Â  Â  i = i + pi_14;
>> >     >Â  Â  Â  Â  Â  Â  }
>> >     >
>> >     >Â  Â  Â  Â  Â  Â  continue;
>> >     >
>> >     >Â  Â  Â  Â  } // end of if-else.. block
>> >     >
>> >     >Â  Â  Â  Â  // compare with character at last failed index.
>> >     >Â  Â  Â  Â  if (last_failed_index >= 0) {
>> >     >
>> >     >Â  Â  Â  Â  Â  Â  if (pattern[last_failed_index] != text[i +
>> >     last_failed_index]) {
>> >     >Â  Â  Â  Â  Â  Â  Â  Â  continue;
>> >     >Â  Â  Â  Â  Â  Â  }
>> >     >
>> >     >Â  Â  Â  Â  }
>> >     >
>> >     >Â  Â  Â  Â  if (pattern[0] == text[i]) {
>> >     >
>> >     >Â  Â  Â  Â  Â  Â  //full_pattern_search = full_pattern_search + 1;
>> >     >Â  Â  Â  Â  Â  Â  end_index = i + pi_44;
>> >     >Â  Â  Â  Â  Â  Â  not_found = false;
>> >     >Â  Â  Â  Â  Â  Â  int index = 0;
>> >     >
>> >     >Â  Â  Â  Â  Â  Â  for (index = i; index <= end_index; index++) {
>> >     >Â  Â  Â  Â  Â  Â  Â  Â  if (text[index] != pattern[index - i]) {
>> >     >Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  last_failed_index = index - i;
>> >     >Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  not_found = true;
>> >     >Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  break;
>> >     >Â  Â  Â  Â  Â  Â  Â  Â  }
>> >     >Â  Â  Â  Â  Â  Â  } // end of inner for loop
>> >     >
>> >     >Â  Â  Â  Â  Â  Â  if (not_found == false) { // match is found
>> >     >Â  Â  Â  Â  Â  Â  Â  Â  return (text + i);
>> >     >Â  Â  Â  Â  Â  Â  Â  Â  //return i;
>> >     >Â  Â  Â  Â  Â  Â  } else if (pattern_char[(int)(text[index])] == 0)
>> >     {
>> >     >Â  Â  Â  Â  Â  Â  Â  Â  i = index;
>> >     >Â  Â  Â  Â  Â  Â  }
>> >     >Â  Â  Â  Â  } // end of if pattern[0]
>> >     >
>> >     >Â  Â  } // end of outer for loop
>> >     >
>> >     >Â  Â  return NULL;
>> >     >Â  Â  //return -1;
>> >     >
>> >     >} // end of choudhary_string_search_algorithm
>> >     >
>> >     >===================================================================
>> >     ================
>> >     >
>> >     >Regards,
>> >     >Amit
>> >
>> >References
>> >
>> >   1. mailto:unixbhaskar@gmail.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-06-13 10:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-13  8:30 [Code] Fastest String Search Algorithm Amit Choudhary
2021-06-13 10:05 ` Bhaskar Chowdhury
2021-06-13 10:30   ` Amit Choudhary
     [not found]   ` <CAFf+5zjn9K-ufRGLQdH9B1OrMEzQdP2M-xPkbuss9Uq0c82Z5w@mail.gmail.com>
2021-06-13 10:34     ` Bhaskar Chowdhury
2021-06-13 10:46       ` Amit Choudhary
2021-06-13 10:58         ` Bhaskar Chowdhury

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.