I am currently using the set values extensions to assign users to groups. For example:
If value1 >= 10000 then X = high
If value1 < 10000 then X = low
So - this works - but if we decide to calculate 5 or 6 groups would there be an advantage to creating a JS Extension that handles this and possibly use less code? Or would the difference be minmal?
Initially the performance difference would be minimal, but as your profile grows these things can add up. Another important thing to keep in mind is that you want to make sure everything is organized and efficient. This is especially important if other people will work on the profile, whether they are other people at your company or someone at Tealium. If you can do something in one lookup table, that's usually the route you'll want to go. You don't want to have to write custom JS code if you can help it since it's not as maintainable going forward.
I agree. I like using JS extensions if I want to make sure a lot of thing that have to be run in order are all nicely put into a single extension (instead of several 'wizard' style extensions) - you can sometimes end up with dozens of extensions when you may only need one.
However, in this use-case I think Son is right that a vlookup (using RegEx) to assign these users will be much more visible to other users and more maintainable.