Skip to content

4

At first sight, the home page of memoid.ru looks similar to those less than ordinary news aggregation sites which collect and group news headlines and then lead you to a page with news text accepted via RSS or other syndication protocol.

But a landing page of memoid.ru is appended by an encyclopaedic article which gives additional information about the main topic of the news. According to the rumours came from project owners, the "Poiskovye Tekhnologye" (The Technologies of Search) company, which is partially owned by Ashmanov & Partners company, well known for their antagonism to the Wikipedia, these academic articles are written by expects in their field and corrected by professional editors, both yet unknown (sic!), and thus are of better quality than Wikipedia.

Also the rumours say the functionality of the site hasn't implemented in full yet. E.g. it will have a search functionality which will lead users directly to academic articles according to the user queries.

I guess the combination of a news article and an academic article in one web page is an attempt to accept more traffic from both news and organic search engines. Likely alternative solutions of combining news feeds with the Wikipedia will follow.

Even faster strncpy has a caveat of nonpadding by 0's if the length of source string is less than the length specified by a function parameter. The version below has this issue fixed, but it's still faster than standard version of strncpy, if the code is compiled with optimization on a modern processor.
...continue reading "Even faster strncpy, fixed"

2

NoBrandSearch is a new project of Hakia. It's intended to be an one more blind comparison of search engines. Unfortunately, it has a flaw in non-Latin characters display for Google results (and, in particular, that fact has led me to vote for Bing's results which displays Cyrillic correctly):
...continue reading "nobrandsearch of Hakia is flawed"

Begun, the second large Russian context ads network introduces templates for context ads, as it's been stated at corporate site.

A template of context ads is a basic form of ads in which Begun inserts search keywords automatically according to user queries. E.g., the ad template heading "#foreign# cars sale" will appear as "Audi cars sale" for the user query "Audi cars", which would attract attention of potential customers who are interested in cars of this particular car maker.

Thus an advertiser can use single template for a bunch of keywords or promoted products, which will show ads relevant to a particular search query.

Templates can be used as in ad heading as in ad description but only once in each section.

3

Below is a faster implementation of the memcpy function (previous version is here). The comparison of the old, the new, the FreeBSD's version in C language and the standard implementation on the test:

test0: FreeBSD memcpy in C 2.7686
test1: <new dps_memcpy>    0.43485
test2: <old dps_memcpy>    2.50218
test3: <standard memcpy>   0.456584
ratio(1/2): 0.17
ratio(1/0): 0.16
ratio(2/0): 0.90
ratio(1/3): 0.95

...continue reading "Even faster memcpy"

2

Below is a faster implementation of the strncpy function (previous version is here). The comparison of the old, the new and the standard implementation on the test:

test1: <new dps_strncpy>  3.00593
test2: <old dps_strncpy>  3.39416
test3: <standard strncpy> 5.06081
ratio(1/2): 0.89
ratio(1/3): 0.59
ratio(2/3): 0.67

...continue reading "Even faster strncpy"

As continue of bubbles, caches and predictors of transitions, a new version of Bubble sort à la Duff's device:


    for (i = 1; i < N; i++) {
      n = (i + 7) / 8;
      s = i % 8;
      src = a + (n - 1) * 8;
      switch(s) {
      case 0:    do {    if (src[8] < src[7]) swap(src[8], src[7]);
      case 7:        if (src[7] < src[6]) swap(src[7], src[6]);
      case 6:        if (src[6] < src[5]) swap(src[6], src[5]);
      case 5:        if (src[5] < src[4]) swap(src[5], src[4]);
      case 4:        if (src[4] < src[3]) swap(src[4], src[3]);
      case 3:        if (src[3] < src[2]) swap(src[3], src[2]);
      case 2:        if (src[2] < src[1]) swap(src[2], src[1]);
      case 1:        if (src[1] < src[0]) swap(src[1], src[0]);
	src -= 8;
	} while(--n > 0);
      }
    }

Updated code: bubble-duff.zip