Comparative Performance Analysis of Object-Oriented Programming and Data-Oriented Programming in TensorFlow - Mangapul Siahaan; Jefriyanto Chandra; Muhamad Dody Firmansyah (Bina Nusantara University, 2026)
The rapid advancement of deep learning significantly increases computational demands, making performance optimization essential for model scalability and deployment. While numerous studies optimize neural network architectures, the effect of different programming paradigms on computational efficiency remains insufficiently explored. This study aims to compare Object-Oriented Programming (OOP) and Data-Oriented Programming (DOP) paradigms in TensorFlow-based deep learning workflows, focusing on their performance across four processing phases: build, compile, train, and evaluate, under a controlled experimental environment with repeated iterations and systematic measurements. Both paradigms are implemented using identical Convolutional Neural Network (CNN) architectures trained on the CIFAR-100 image dataset over thirty controlled experimental iterations. A custom profiler integrating the Python System and Process Utilities (psutil) and NVIDIA Management Library (pynvml) monitors real-time system performance, capturing CPU and GPU utilization as well as memory usage. The results reveal that DOP achieves better resource efficiency with lower memory usage (549.98 MB versus 676.25 MB), higher GPU utilization (64.68% versus 61.08%), and faster evaluation execution (1.50 seconds versus 2.59 seconds), while also attaining higher model accuracy (32.38% versus 28.08%). In contrast, OOP benefits from TensorFlow’s Sequential API optimizations, resulting in faster training times but greater CPU and memory consumption. These findings highlight that DOP provides superior runtime efficiency and offers practical benefits for performancecritical deep learning applications.