Results 1 to 4 of 4
  1. #1
    int80 is offline Member
    Join Date
    Jul 2008
    Posts
    29
    Rep Power
    0

    Default Optimisation of a java equijoin implimentation

    I've been trying to figure out ways of optimising this method, but can't for the life of me think of anyway of doing it...

    I have considered recursion, but it's a bit too intense for my mind to figure out.



    Any ideas would be appreciated!

  2. #2
    toadaly is offline Senior Member
    Join Date
    Jan 2009
    Posts
    671
    Rep Power
    6

    Default

    It doesn't seem too bad to me, other than I'd make the variable name longer and more meaningful. Are you trying to improve runtime performance, or design elegance?

  3. #3
    int80 is offline Member
    Join Date
    Jul 2008
    Posts
    29
    Rep Power
    0

    Default

    Runtime performance. Recursion is what I was thinking, but I just hate recursion.

  4. #4
    toadaly is offline Senior Member
    Join Date
    Jan 2009
    Posts
    671
    Rep Power
    6

    Default

    Recursion probably isn't going to improve runtime performance. To improve runtime performance, you have to find ways of eliminating unnecessary steps or excessive object creation. It looks like the algorithm is an N^3 type algorithm. It might be possible to create some kind of branching algorithm that gets it down to N*log(N)^2, but that's the kind of thing researchers spend years looking for.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •