Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
16 years ago

Speed of printf

Whats the speed in kbit/s for the printf Command? I am using a Stratix III Board(NIOS II CPU).

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    The question is unanswerable as it depends on too many outside factors such as:

    1 - Processor speed

    2 - What is the STDOUT device and it's speed

    3 - What other things is the processor busy doing.

    Even knowing those numbers nobody is going to be able to estimate it for you. You'll just need to run some tests and measure it for your system.

    Relatively speaking, printf is slow.

    Jake
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    The next problem is (maybe that isnt problem): function printf take about 50kB of memory. So i use puts function and numbers retype to string. The final code is smaller. Under 20kB.

    VK