Re: [Haskell-cafe] Libevent FFI problems

2008-07-30 Thread Scott Cruzen
* Adam Langley [EMAIL PROTECTED] [080725 13:05]:
 2008/7/25 Krzysztof Skrzętnicki [EMAIL PROTECTED]:
  Developing a high-performance web server in Concurrent Haskell
  http://www.haskell.org/~simonmar/papers/web-server-jfp.pdf (see page 15)
 
  Perhaps you might be interested in this paper also because of its topic.
 
 That's a good reference. Also note that the paper is 6 years old and
 GHC has come a long way since then. I'd suspect that the graph on page
 15 would look much more favourable to Haskell these days.

http://www.seas.upenn.edu/~lipeng/homepage/unify.html

This paper (and included code) should be relevant and useful. There's an
epoll wrapper and a lot of good stuff.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: [ANN] bloomfilter 1.0 - Fast immutable and mutable Bloom filters

2008-06-03 Thread Scott Cruzen
* Jim Snow [EMAIL PROTECTED] [080531 15:23]:
 Without looking at the code to verify that this is how it has really  
 been implemented, a bloom filter is like a series of hash tables, where  
 the hash table entries are one bit.  The bit is set if there is an item  
 that hashes to that value in the bloom filter.  So, assuming a single  
 hash table where half the bits are set, there's a 50% false positive  
 rate and no false negatives when you do a membership test.

 To reduce the false positives, we can add another hash table with a  
 different hash function.  Assuming it also is half full, we can check if  
 an item is in both tables, and our false positive rate drops to 25%.

 In practice, one might use something like 32 hash tables.  This yields a  
 false positive rate of 1/(2^32).  Their most obvious application is to  
 store the dictionary for a spell checker in a space-efficient way,  
 though I have a friend who wrote a paper on using them for router caches.

 There was a google tech talk on bloom filters awhile ago:  
 http://www.youtube.com/watch?v=947gWqwkhu0

One other use:

LOAF is a simple extension to email that lets you append your entire
address book to outgoing mail message without compromising your privacy.
Correspondents can use this information to prioritize their mail, and
learn more about their social networks. The LOAF home page is at
http://loaf.cantbedone.org.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] haskell version of fractal benchmark

2007-06-09 Thread Scott Cruzen
* Andrew Coppin [EMAIL PROTECTED] [070608 02:45]:
Bayley, Alistair wrote:
 
 [[1]mailto:[EMAIL PROTECTED] On Behalf Of Andrew Coppin
 
 Donald Bruce Stewart wrote:
 
 Some things to remember using Doubles:
 
 * {-# OPTIONS -fexcess-precision #-}
 * -fvia-C
 * -fbang-patterns
 * -optc-O2 -optc-mfpmath=sse -optc-msse2
 * -optc-march=pentium4
 
 1. What do all those things do?
 2. Is the effect actually that large?
 
 Large? Depends what you mean by large, but adding a few flags to get
 just a 10-20% speedup isn't to be ignored:
 
Sure - if it really is 10-20%. (And not, say, 0.001 - 0.002%.)

A single data point for all of this, I have a program that calculates:

P^1_i = S_i/sum_k S_k
P^m_i = sum_{k!=i} P^1_k*P^m-1_i(S_~k)

Here's timings for the different options:

options  run timecompile time
none  46.401   3.136
-O 5.033   4.906
-O24.967   6.755
-O2 -fexcess-precision 3.710   6.396
all listed options 3.602   6.344

Results with -fexcess-precision are very insignificantly different
(1.0 e-7).
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] New book: Real-World Haskell!

2007-05-23 Thread Scott Cruzen
* Dan Weston [EMAIL PROTECTED] [070523 12:41]:
  What power animal have you chosen for the cover of your O'Reilly book? Alas, 
  most of the good ones are gone already!

I'd like to suggest the Mantis shrimp because they have excellent
vision, they're long lived and they pack a punch.

I haven't checked, but it's almost certainly not already used.

http://en.wikipedia.org/wiki/Mantis_shrimp
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe