Coder Social home page Coder Social logo

Comments (2)

gstrauss avatar gstrauss commented on August 13, 2024

Is there a measurable difference in the performance tests if the global variables are in the .data section or the .bss section?

The latest gcc stable release is gcc 13.2 (https://gcc.gnu.org/releases.html)

from byte-unixbench.

huyubiao avatar huyubiao commented on August 13, 2024

Is there a measurable difference in the performance tests if the global variables are in the .data section or the .bss section?

The latest gcc stable release is gcc 13.2 (https://gcc.gnu.org/releases.html)

  • I tried to test with dhry_1.c and dhry_2.c in 13.2: when using -fno-common the performance is around 9200, but with -fcommon the performance is above 9500. After the global non-static variables in dhry_1.c are initialized and -fcommon is used, the performance returns to 9200. On gcc 10.3 the difference in performance is sometimes greater than 10%.
  • By the way: I was using Intel Sapphire Rapids when it comes to the CPU architecture. This problem may not exist on other architectures.
  • I mean, is it possible to unify here: 1. Initialize global non-static variables; 2. Explicitly use -fno-common during compilation.

from byte-unixbench.

Related Issues (20)

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.