Comparisons between the routing functions

This documentation contains quantitative comparisons of the data routing functions. It presents results of comparing the RUN() against the PUT() functions.

In this example, two maps that attempt to route input to any one of twenty possible output targets are executed. The two maps differ in their use of RUN() or PUT() to route data items to an output target.

For each map, two scenarios were tested, each processing input of different sizes. Varying the input was intended to indicate relative scalability between the two functions in a routing context.

The following table presents the example results.

For each function in column 1, the row presents the execution time to process 128 KB of input data (column 3) and 4 MB of input data (column 4).

Input Size (Bytes)
Map Functions 128 KB 4 MB
PUT() 0.74 13.43
RUN() 2.14 62.22

This table captures execution times in seconds for the two example maps. Even for input that is smaller in size, PUT() executes faster. For input that is larger in size, the overhead of the additional maps in RUN() processing is far more noticeable. Execution of the PUT map completes in nearly one-fifth the time of the RUN map.

Comparing type sizes

Regardless of whether PUT() or RUN() is used to route data, there is an execution time overhead in each routing attempt. Minimizing the number of routings performed will improve execution time. Careful attention to map and schema design can reduce the number of routings done.

This example demonstrates the benefit of minimizing routing attempts. Four maps were run with inputs of two different sizes. The maps differ in two primary ways. They use two different functions, PUT() and RUN(), and different schema designs.

The two different schema designs are used for the same input sources. In the first schema design, N1, the input card schema consists of a simple series of items (0:s). In the second schema design, N100, the input card schema consists of a series of groups of items. The groups themselves are series, (0:100). Therefore, the second schema has two levels of series where the first, N1, has one.

The following table presents the example results.

This table compares the execution times of two schema designs, based on input data size and whether the map uses the PUT function or the RUN function.

For each schema design in column 1, the row compares map execution times when a map uses the PUT function to process 128 KB of input data (column 2) and 4 MB of input data (column 3), and when the map uses the RUN function to process 128 KB of input data (column 4) or 4 MB of input data (column 5).

PUT() RUN()
Schema Design 128 KB 4 MB 128 KB 4 MB
N1 0.74 13.43 2.14 62.22
N100 0.36 0.75 0.41 1.83

This table captures execution times in seconds for the four example maps. The savings in execution time are significant, especially at larger input sizes. Whether the map uses RUN() or PUT(), reducing the number of routes can improve execution time.

Simply grouping input together to route larger amounts of data is not always possible in every map design effort. The degree to which map or schema design can address route reduction depends on the needs of the business process. This example demonstrates the potential for improving execution time by reducing the number of routing attempts.