Article
· May 9, 2022 2m read

Benchmark time of response for messages in python and objectscript

This is a benchmark built in python and objectscript in InterSystems IRIS.

The objective is to compare the speed for sending back and forth a thousand request/message from a BP to a BO in python and in objectscript.

See https://github.com/LucasEnard/benchmark-python-objectscript for more information.

IMPORTANT : Here are the results of time in seconds, for sending 1000 messages back and forth from a bp to a bo using python, graph objectscript and objectscript.

String messages are composed of ten string variables.

Object messages are composed of ten object variables, each object as it's own int, float, str and List(str).

Messages strings Time (seconds) for 1000 messages back and forth
Python BP 1.8
BPL 1.8
ObjectScript 1.4
Messages objects Time (seconds) for 1000 messages back and forth
Python BP 3.2
BPL 2.1
ObjectScript 1.8

The function in the row have x times the time of the function in the column :

Messages strings Python BPL ObjectScript
Python 1 1 1.3
BPL 1 1 1.3
ObjectScript 0.76 0.76 1

For example, the first row tells us that Python string time is 1x the time of the Objectscript graph string function and 1.3x the time of the Objectscript string function.
( thanks to the first table we can verifiy our results :
1.3 * 1.4 = 1.8
1.3 is the x in the table in the first row last column, 1.4s is the time for the string messages in objectscript seen in the first table of this section and 1.8s is in fact the time for the string messages in python that we can find by seeking into the first table of this section or by the calculus as shown before.)

We have, the function in the row having x times the time of the function in the column :

Messages objects Python BPL ObjectScript
Python 1 1.5 1.8
BPL 0.66 1 1.2
ObjectScript 0.55 0.83 1
Discussion (3)2
Log in or sign up to continue