GithubHelp home page GithubHelp logo

nazarcybulskij / mobile_bechmarks_ Goto Github PK

View Code? Open in Web Editor NEW
48.0 4.0 14.0 55.84 MB

Swift 0.12% Objective-C 0.14% Java 32.59% Kotlin 0.05% Dart 0.15% HTML 0.02% JavaScript 0.04% Starlark 0.02% Ruby 0.10% CMake 0.40% C 0.04% C++ 0.40% Makefile 0.09% C# 0.16% Assembly 65.67%

mobile_bechmarks_'s Introduction

Mobile_Bechmarks

mobile_bechmarks_'s People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mobile_bechmarks_'s Issues

Misleading benchmarks

There a couple of things wrong with this benchmark.

  1. The benchmark does not make use of the calculated value.

    Running the same algorithm in Rust as is would make use of dead-code elimination, resulting in an effective computation time of 0 ns. ๐Ÿ†

  2. The benchmark computes the same constant value in every iteration, which may be optimized to a single evaluation multiplied by iteration count.

    Benchmarks should make sure the compiler is not simply applying this optimization, and as a result avoiding measuring actual work.

  3. The "getOneByPi" benchmarks are inconsistent and not actually benchmarking the same algorithm.

    For ObjC it uses an int as loop variable, while for Swift it uses a double. This adds an unnecessary int-to-double conversion on every loop iteration for the ObjC benchmark.

  4. By running the Swift benchmark from SwiftUI, while running the ObjC benchmark from UIKit you're effectively including the given UI frameworks implementation details.

    Do not run benchmarks within UI frameworks, or at least make sure to run them in the same(!) UI framework.

When run in isolation (getOneByPi benchmark) we get these numbers:

C: 10.124000 ms
C (fixed): 9.951000 ms
Swift: 10.008999999999908 ms
Rust: 10.008999999999903 ms

These numbers are way too close to judge upon.

I only looked at getOneByPi as most implementations wouldn't even compile as is, but the issues described here apply to all benchmarks.

In its current state the benchmarks and Medium post misleading at best.

Apart from the fact that this kind of number crunching is in no way representative for the performance of a mobile framework. For benchmarking languages doing hot-loop primitive maths is not going to give you much insight into the overall performance of a given language in realistic scenarios. And for benchmarking frameworks, having the measured code not call into said frameworks at all doesn't benchmark anything useful either.

Not the best look for an evangelism post.

React source needs refactoring.

Hi,
your article was very impressive.
But It would be better comparing, when you some modify source.
Would you split out event handler source
from in render function?

In render function react makes new event handler every state changes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.