fast

Efficient Immutable Map Implementation?

Hi, I'm wondering if there is an implementation of a map which is: Immutable, so that I can use it in functional programming, and effortlessly ensure transactions and concurrency. Fast. I've checked out Binary Search Trees (RB, AVL) and Tries, but none of them seemed to be as fast as Hash Tables. Is there a map implementation that supp...

Fast little-endian to big-endian conversion in ASM

I have an array of uint-types in C#, After checking if the program is working on a little-endian machine, I want to convert the data to a big-endian type. Because the amount of data can become very large but is always even, I was thinking to consider two uint types as an ulong type, for a better performance and program it in ASM, so I am...

Javascript - Fastest way of copying an array portion into another

I need to copy FAST a portion of an array into another, replacing it's old values. No range checkings needed. Number of items to copy: 16384 The array only contains integers benchmark code: http://codebase.es/test/copytest.htm This is my approach: var i = 0x4000>>5; // loops count var j = 0x4000; // write start index var k...

What is the fastest (built-in) comparison for string-types in C#

What is the fastest built-in comparison-method for string-types in C#? I don't mind about the typographic meaning here it's only for use in sortedLists and stuff like that to search fast in large collections. I think there are only two methods: Compare and CompareOrdinal. What's the fastest? The second question is if there is a faster m...

How does fast user switching affect a windows service?

How does fast user switching affect a windows service? Are the services suspended? or do they keep running in the background when a different user logs in? ...

Caching data vs. writing in memory table

Which would be the best way to achieve a fast hash / session storage with one of these three ways? Way 1: Create a memory table in MySQL that stores a hash and a timestamp when the entry was created. A MySQL event automatically deletes all entries older than 20 minutes. This should be pretty fast because all data is stored in memory, bu...

Is C faster than C++?

I've heard many opinions on this subject, but never saw any good proofs that C is faster than C++. So, ...is C faster than C++? EDIT: This is a Runtime comparison. ...

Need a fast random generator for c++

Hi guys. I'm trying to do some opt-3 swapping on my TSP generator for euclidian distances, and since I in many cases have more than ~500 nodes, I need to randomly select at least 1 of the 3 nodes that I want to try swapping. So basically I need a random-number function that's fast. (the normal rand() is way too slow) It doesn't have to...

C# += (plus equals) (Assignment by addition) working very slow, when string is too long?

Hello, I have a for loop and what I do is this. forloop ( loop 7000 times) { x += 2000_char_long_string; } Code lasts really long time in this forloop, maybe more than 1 minute. How can I solve this problem? Thanks. ...

High speed WPF plotting control

I currently have a Win32 application (developed in C++ Builder/VCL) which I am redesigning from the ground up for WPF 4. One of the core functions in the app is drawing engineering/scientific plots. I love the control I'm using now (iocomp Plot Pack - excellent product with phone support!), but they don't have a WPF version and don't s...

C# fast crc32 calculation :

I've profiled my application with Ants and found out that > 10% is in CRC32 calculations. (The CRC32-calculation is done in plain C#) I did some googling and learned about the following intrinsics in Visual Studio 2008 : _mm_crc32_u8 _mm_crc32_u16 _mm_crc32_u32 _mm_crc32_u64 ( http://msdn.microsoft.com/en-us/library/bb514036.aspx )...

What is faster Flash or Silverlight?

What is faster Flash or Silverlight? So I mean there is working Flash quake and Silverlight quake (not totally working yet) So what is faster after all? Or Are they all same speed? really need to know to get an idea on what it’s better to start my cool programming project. ...

iPhone UIWebView slow loading to local HTML files

Hello Guys, i'm developing an app that requires caching web pages (completely) along with their CSS files and images. so after saving the entire Html of the page ( going through the links to store each file along with the Html file ) later on, while viewing the html file offline, UIWebView takes a long time to load the page, given tha...

Fastest way to change column data type in SQL Server

In SQL Server 2008, I have got a table of around 3 million records. I want to change the type of one of its columns from float to int. But seems it will take a lot of time. Is there any way to accomplish this very fast? ...

Using an index to recursively get all files in a directory really fast

Attempt #2: People don't seem to be understanding what I'm trying to do. Let me see if I can state it more clearly: 1) Reading a list of files is much faster than walking a directory. 2) So let's have a function that walks a directory and writes the resulting list to a file. Now, in the future, if we want to get all the files in t...

PHP: How to sort values of an array in alphabetical order?

I want to sort values of an array in alphabetical order in PHP. If all values started with same character then they should be sorted using second character and so on. Ignore case sensitive. For Example: before: values[0] = "programming"; values[1] = "Stackoverflow"; values[2] = "question"; values[3] = "answers"; values[4] = "AA Systems...

Fast alternative to java.nio.charset.Charset.decode(..)/encode(..)

Anybody knows a faster way to do what java.nio.charset.Charset.decode(..)/encode(..) does? It's currently one of the bottleneck of a technology that I'm using. [EDIT] Specifically, in my application, I changed one segment from a java-solution to a JNI-solution (because there was a C++ technology that was most suitable for my needs than...

Fail Fast vs. Robustness

Our product is a distributed system. The modules I work on are fairly new, quite rigorous, well tested. They were developed with recent best practices in mind. Other modules can be considered as legacy software. While I'm vigilant about everything that happens within modules I'm responsible for, I'm under constant pressure to work with ...

Learn Very Fast The PHP Basics

I'm needing to help my friend with his big phpBB board, but I want first to learn the basics of PHP very very fast. I just want to learn the basics to go and improving with some more time. In the books you need to take time to read, but I need to learn more faster, there is any suggestion? ...

Package for fast determination of similarity between two bit sequences

I need to compare a query bit sequence with a database of up to a million bit sequences. All bit sequences are 100 bits long. I need the lookup to be as fast as possible. Are there any packages out there for fast determination of the similarity between two bit sequences? --Edit-- The bit sequences are position sensitive. I have seen a p...