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.

  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 type tree 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 type tree designs.

The two different type tree designs are used for the same input sources. In the first type tree design, N1, the input card type tree consists of a simple series of items (0:s). In the second type tree design, N100, the input card type tree consists of a series of groups of items. The groups themselves are series, (0:100). Therefore, the second type tree 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 type-tree designs, based on input data size and whether the map uses the PUT function or the RUN function.
  PUT() RUN()
Type Tree 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 type tree 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.