Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #14697

Re: Detect user graphics card?

From Stefan Weiss <krewecherl@gmail.com>
Newsgroups comp.lang.javascript
Subject Re: Detect user graphics card?
Date 2012-06-27 01:05 +0200
Organization albasani.net
Message-ID <jsdf79$c8m$1@news.albasani.net> (permalink)
References <e297bfd5-2f14-4f87-b6b4-92dc73c8b83d@r3g2000yqh.googlegroups.com> <js719u$7j2$1@dont-email.me> <4454122.7EdHYbU6jS@PointedEars.de> <jsc6bu$o4k$1@news.albasani.net> <2493601.R5VuAm1OKa@PointedEars.de>

Show all headers | View raw


On 2012-06-26 22:38, Thomas 'PointedEars' Lahn wrote:
> Stefan Weiss wrote:
>> A half-hearted benchmark indicates that the last version could be
>> between 2x faster (Chrome, Opera) and 5x faster (Firefox) than the
>> original.
> 
> AISB, I am not that interested in benchmark results as they are treacherous.  
> I am more interested in provably working, efficient algorithms.

I only mentioned that because you seemed concerned about the overhead of
function calls (in a different thread). I've also underestimated the
efficiency of the current compilers before [1]. These days it's hard to
predict which algorithms will be more efficient than others, let alone
"provably efficient". It depends too much on which optimizations the
engines make. Without intimate knowledge of the compiler internals, the
best we can do is measure the alternatives; and the best we can derive
from that is some rough idea of efficiency in the tested engines.

Normally, I wouldn't have bothered, but a function which converts color
values could actually be called many times in succession (for example,
to manipulate an image-as-pixel-array).


- stefan


[1] There was a thread in this group a few months ago (I can't remember
the exact title), where different alternatives for Math.floor() were
mentioned. I would have bet a tidy sum that one of alternatives using
binary operators would be fastest, and I would have lost. IIRC, Scott
Sauyet did a benchmark and found out that Math.floor() is apparently
very well optimized in some engines.

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Detect user graphics card? justaguy <lichunshen84@gmail.com> - 2012-06-24 04:31 -0700
  Re: Detect user graphics card? Gregor Kofler <usenet@gregorkofler.com> - 2012-06-24 14:30 +0200
    Re: Detect user graphics card? justaguy <lichunshen84@gmail.com> - 2012-06-24 07:43 -0700
    Re: Detect user graphics card? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-06-25 05:14 +0200
      Re: Detect user graphics card? justaguy <lichunshen84@gmail.com> - 2012-06-24 21:01 -0700
      Re: Detect user graphics card? Stefan Weiss <krewecherl@gmail.com> - 2012-06-26 13:27 +0200
        Re: Detect user graphics card? justaguy <lichunshen84@gmail.com> - 2012-06-26 12:54 -0700
        Re: Detect user graphics card? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-06-26 22:38 +0200
          Re: Detect user graphics card? Stefan Weiss <krewecherl@gmail.com> - 2012-06-27 01:05 +0200
            Re: Detect user graphics card? Scott Sauyet <scott.sauyet@gmail.com> - 2012-06-27 07:07 -0700
          Re: Detect user graphics card? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2012-06-29 16:41 -0700
            Compute web-safe colors (was: Detect user graphics card?) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-06-30 10:40 +0200
        Re: Detect user graphics card? Dr J R Stockton <reply1226@merlyn.demon.co.uk.not.invalid> - 2012-06-27 19:44 +0100
  Re: Detect user graphics card? Arno Welzel <usenet@arnowelzel.de> - 2012-06-27 17:57 +0200

csiph-web