Maybe I should have mentioned several facts I omitted in the original post, sorry. Here comes some background information:
In production with external time measures at least processing seems faster with global than lexical variables.
BTW:
Using C or Pascal instead and coding splitting, filtering and joining by hand does not seem to gain much here (to be honest: almost nothing), not to mention using provided libraries, which seem to be even slower as they favor generic solutions. This only costs more of programmer's time.