High performance library for set operations?

  • Thread starter nn4l
  • Start date
  • #1
1
0
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 on High performance library for set operations?

Replies
10
Views
2K
Replies
6
Views
4K
Replies
1
Views
600
Replies
1
Views
1K
  • Last Post
Replies
6
Views
2K
  • Last Post
Replies
3
Views
611
  • Last Post
Replies
4
Views
2K
Top