473,385 Members | 1,337 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Re: String array intersections

On Apr 17, 1:55 pm, "Peter Duniho" <NpOeStPe...@nnowslpianmk.com>
wrote:

<snip>
Mind you, depending on your definition of "fast", processing 1 million of
anything isn't necessarily ever going to actually be fast. :)
Ooh, I don't know about that. A little test app I wrote using
HashSet<stringtakes about 100ms on my laptop with N=1000000 and
M=50000.

Not the sort of thing you want to be doing *really* regularly (like on
every web request to a server) but still pretty fast :)

Jon
Jun 27 '08 #1
1 1261
On Thu, 17 Apr 2008 16:04:06 -0700, Jon Skeet [C# MVP] <sk***@pobox.com>
wrote:
>Mind you, depending on your definition of "fast", processing 1 million
of
anything isn't necessarily ever going to actually be fast. :)

Ooh, I don't know about that. A little test app I wrote using
HashSet<stringtakes about 100ms on my laptop with N=1000000 and
M=50000.
Like I said, it depends on your definition of "fast". In some scenarios,
100ms is incredibly slow.

That's of course ignoring the question as to whether your test was even a
valid performance measurement. Depending on the hash implementation,
there could be a significant difference between the best-case (no
collisions) and worst-case scenarios (many collisions, no strings actually
in the intersection). But for the sake of this discussion, I'm willing to
grant you that. :)

Pete
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Paul Graham | last post by:
Hi All, New to Java2D and am trying to do something I know should be relatively simple but isn't turning out to be. I want to draw intersecting rectangles across an arbitrary shape that can...
97
by: s | last post by:
Can I do this: #define MYSTRING "ABC" .. .. .. char mychar = MYSTRING; .. .. ..
16
by: Don Starr | last post by:
When applied to a string literal, is the sizeof operator supposed to return the size of the string (including nul), or the size of a pointer? For example, assuming a char is 1 byte and a char *...
7
by: al | last post by:
char s = "This string literal"; or char *s= "This string literal"; Both define a string literal. Both suppose to be read-only and not to be modified according to Standard. And both have...
4
by: songkv | last post by:
Hi, I am trying to reassign an array of char to a string literal by calling a function. In the function I use pointer-to-pointer since I want to reassign the "string array pointer" to the string...
22
by: spike | last post by:
How do i reset a string? I just want to empty it som that it does not contain any characters Say it contains "hello world" at the time... I want it to contain "". Nothing that is.. Thanx
4
by: Simon Schaap | last post by:
Hello, I have encountered a strange problem and I hope you can help me to understand it. What I want to do is to pass an array of chars to a function that will split it up (on every location where...
17
by: meital | last post by:
There are three kinds of stones: red,green and blue. Each cell of the array contains one stone. The array needs to be sorted so that all the red stones will come first, then the blue ones and...
8
by: Jeff Johnson | last post by:
Hi, I've begun converting an ASP site over to .NET and I'm a novice at both the new platform as well as C#. I have a COM+ object that returns a string array when it is called. The size of...
11
by: Zordiac | last post by:
How do I dynamically populate a string array? I hope there is something obvious that I'm missing here Option Strict On dim s() as string dim sTmp as string = "test" dim i as integer ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.