Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8142455
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T12:49:39+00:00 2026-06-06T12:49:39+00:00

The language shootout benchmarks at http://benchmarksgame.alioth.debian.org/ indicate that FPC programs use about 1/50th of

  • 0

The language shootout benchmarks at http://benchmarksgame.alioth.debian.org/ indicate that FPC programs use about 1/50th of the memory that comparable programs using g++ use. Do these benchmarks unintentionally favor fpc or is it really true that FPC is this much better than g++? I’ve always considered these benchmarks as a collection of decent micro-benchmarks, so I’m surprised at these results, since a factor of 50 times is pretty significant IMHO.

References:

http://benchmarksgame.alioth.debian.org/u32/pascal.php
http://benchmarksgame.alioth.debian.org/u64q/pascal.html

Edit:
This is becoming even more interesting since this page claims that pascal used only 8KB for some of the programs, which seems amazingly low

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T12:49:41+00:00Added an answer on June 6, 2026 at 12:49 pm

    Note that startup time is IIRC another benchmark where FPC peaks

    I think the answer must be primarily sought in the fact that Free Pascal statically links programs by default, avoiding libc and other auxiliary libraries

    This has several consequences:

    • For the simple programs that are being benchmarked, FPC programs are static using only the own RTL (no static copy of libc) and have no dynamic linking overhead (both in time and memory). Including mapping shared glibc segments (is this so?) that might be mistaken for application memory use.
    • libc might do potentially unneeded but involved initializations that FPC doesn’t do for these simple programs. (like initializing zoneinfo)
    • since FPC uses a totally independent memory manager, the initial block of the heap suballocator might have a different size. Possibly FPC’s is systematically smaller.
    • For threads, the size of the new thread’s stack might cause various differences (size and maybe the fact if it is (partially) only a reservation or committed memory, or whatever the *nix equivalent is of that)

    All in all, I think this observed behaviour is less about FPC, and more about lack of variation amongst the other benchmarked development systems . FPC merely stands out, because nearly everything else is built on top of the gcc/glibc technology (either because they are a direct gcc derivate or because their VM/interpreters are built on top of gcc), and thus all share libc’s general treats. FPC being different merely highlights (g?)libc’s bad scaling towards simple programs. (*)

    The shootout probably might be biassed in the sense that either shared adress space is counted rather than actually used private bytes, or because it doesn’t differentiate enough between private bytes allocated by the suballocator and private bytes actually used by the process. It would probably require a libc/libmalloc core devel however to sort this out, and since the shootout is open source, the question if you can provide a better measurement is open.

    Either that or there is something fundamentally wrong with (g)libc. (I’m no expert at that). A possible solution to get more relevant information would be to run the benchmark on FreeBSD, or a Linux with uclibc. In short anything else but glibc.

    As Igouy’s post states, when linking to libc, FPC gets the (bad) characteristics of the other development systems. This is another indicator that the question should be “why do glibc using binaries perform bad in the shootout memory benchmark” rather than “why does FPC perform well in the shootout benchmark”

    Note that FPC originally avoided libc because of cross-distribution compatibility concerns, and not performance or filesize.

    So to all that assume this is a fluke wrt to measuring the memory usage of FPC, ever considered it is a problem with glibc memory use or the measurement of it? Or rather, that the high glibc number is wrong, and not the low FPC number….

    …. A FPC developer ….

    (*) and before you can say it is merely developed to be efficient for “sizable” applications, remember that the Unix philosophy is about chaining small tools together, and many Unix processes are shorted lived.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I saw Java -server in http://shootout.alioth.debian.org/ for programming language benchmark. I know that -server
Is there a site like language shootout's (shootout.alioth.debian.org and dada.perl.it/shootout/), which show how to
I realize that Oz is a fairly obscure language. I first heard about it
What resources are available that use benchmarks for comparing programming languages? I am interested
Choosing language I see http://github.com/ and OpenBSD.org got 2 examples how to. Github has
Language: PHP / Using Class Upload by Colin Verot About: Multiple Uploading The code
Language Integrated Query. Now I know that the acronyms are. I have seen C#
C language allows jumping inside loop. What would be the use of doing so?
Language = C#.NET Anything that is between [STX] and [ETX] must be accepted rest
C language ensures that a pointer to any struct may be converted to void

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.