With billions of smartphones in use globally, the daily time spent on these devices contributes significantly to overall electricity consumption. Given this scale, even minor reductions in smartphone power use could result in substantial energy savings. This study explores the impact of Lambda functions on resource consumption in mobile programming. While Lambda functions are known for enhancing code readability and conciseness, their use does not add to the functional capabilities of a programming language. Our research investigates the implications of using Lambda functions in terms of battery utilization, memory usage, and execution time compared to equivalent code structures without Lambda functions. Our findings reveal that Lambda functions impose a considerable resource overhead on mobile devices without offering additional functionalities.
翻译:随着全球数十亿智能手机的使用,用户每日在这些设备上花费的时间对整体电力消耗贡献显著。鉴于这一规模,即使智能手机功耗的微小降低也可能带来可观的节能效果。本研究探讨了Lambda函数在移动编程中对资源消耗的影响。尽管Lambda函数以提升代码可读性和简洁性而闻名,但其使用并未增加编程语言的功能性。我们的研究调查了与不使用Lambda函数的等效代码结构相比,采用Lambda函数在电池利用率、内存使用和执行时间方面的影响。研究结果表明,Lambda函数在未提供额外功能的情况下,对移动设备施加了显著的资源开销。