It was the Bitcointalk forum that inspired us to create Bitcointalksearch.org - Bitcointalk is an excellent site that should be the default page for anybody dealing in cryptocurrency, since it is a virtual gold-mine of data. However, our experience and user feedback led us create our site; Bitcointalk's search is slow, and difficult to get the results you need, because you need to log in first to find anything useful - furthermore, there are rate limiters for their search functionality.
The aim of our project is to create a faster website that yields more results and faster without having to create an account and eliminate the need to log in - your personal data, therefore, will never be in jeopardy since we are not asking for any of your data and you don't need to provide them to use our site with all of its capabilities.
We created this website with the sole purpose of users being able to search quickly and efficiently in the field of cryptocurrency so they will have access to the latest and most accurate information and thereby assisting the crypto-community at large.
package collections.hashed
/*
TODO: in Scala 3 we can require KEY, VAL, and CNT to be Int or Long, since we
can express a first-class disjunction type.
*/
trait LinearProbe[@specialized(Int,Long) KEY, @specialized(Int,Long) VAL, @specialized(Int,Long) CNT] {
def count: CNT
// Whether entry was inserted. Value ‘0’ will return ‘false’ (internally ‘0’ values denote an empty entry).
def insert(key: KEY, value: VAL): Boolean
// Whether entry was removed.
def remove(key: KEY): Boolean
// Value that matches the given key, else ‘0’.
def value(key: KEY): VAL
}
/*
Thread-safe LinearProbeLongInt optimized for ‘insert’, ‘find’, and ‘value’ (but not ‘remove’).
Do not employ more threads than hardware threads.
Writers are sequentially synchronized, and readers run asynchronously. Writers
wait for all active readers to complete, and readers wait for all queued writers
to complete. Non-blocking coordination is employed because a context-switch
costs a thousandth to a hundredth of a millisecond, i.e. 100,000 - 1 million
operations per second. Whereas, the critical sections of the ‘insert’, ‘find’,
and ‘value’ have a throughput in excess of 10 million operations per second.
The lines of code added to make this class thread-safe are tagged with /**/
*/
class ThreadedInsertLinearProbeLongInt(bits: Byte, lsr: Byte) extends LinearProbe[Long, Int, Int] {