High performance library for set operations?

  • Thread starter nn4l
  • Start date
  • #1
1
0

Main Question or Discussion Point

I need to perform standard set theory operations such as union, intersection, difference on sets of integer numbers. Each set can have a few hundred elements and each operation can involve a few hundred sets.

The operations can easily be written in Java using the Java Collections Framework, but I am very concerned about the performance. There are several other similar frameworks in all kinds of programming languages, but which one is really suitable for processing massive amounts of data?
 

Answers and Replies

  • #2
CRGreathouse
Science Advisor
Homework Helper
2,820
0
Depending on exactly what you're doing, it could be most efficient to write your own program. If you had a large number of sets containing only integers 1-300, for example, boolean operations on bitstrings would be much faster than general-purpose implementations. A union B = A|B, A intersect B = A&B, A setminus B = A&(!B), etc.
 

Related Threads for: High performance library for set operations?

Replies
10
Views
2K
Replies
6
Views
4K
Replies
1
Views
1K
Replies
6
Views
3K
Top