Thread: using large memory problem

  1. #16
    Registered User
    Join Date
    Dec 2006
    Posts
    14
    I see laserlight knows what I'm talking about . I wanna calculate theta(n) using the formulas in the book , but I wanna calculate the constants too
    That's what bothers me . Putting Knuth's formulas into practice .
    I admit it's a crazy obsession , but that's me

  2. #17
    Registered User
    Join Date
    Dec 2006
    Posts
    14
    Thanks guys .You convinced me . It would probably be extremely complicated and totally useless to calculate those constants .
    So if I'll stick to only timing the algorithms , what compiler/IDE would you recommend me so porting from bc 3.1 be easy ?

  3. #18
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    Well dev-c++ seems to be a popular choice for compiler (the MinGW port of gcc) and an IDE.
    Though a fair few people prefer to use the separate code::blocks IDE with it.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  4. #19
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,743
    Dev-C++ is a good IDE that comes with a good compiler, as already stated.

    Microsoft has also recently released Visual Studio Express as a free download off their site.

    By the way, TechHigh, you were talking about your obsession to see what is happening on every single clock cycle of execution.

    Although it is almost impossible to do so at such a high level, especially with varying implementations of algorithms, you might think about learning the circuit-design languages VHDL or Verilog. Actually, you wouldn't want to spend time implementing a sorting algorithm in either of these languages...because it would be quite complex...but if your obsession about seeing every clock cycle is a general one, in other words, you are always wondering what is happening deep under the hood no matter what program, code, or algorithm is being executed...then these languages would be for you. VHDL and Verilog are more for Computer and Electrical Engineers than for a Computer Scientist...so it is more in the engineering field.

    This is just a tip...you can take it or leave it...depends HOW MUCH interest you have in that kind of stuff.

    VHDL and Verilog are languages that allow you to actually design low level circuits...circuits that get implemented on circuit board: processors, chips, etc.

    Seeing what happens on every clock cycle is very common-place in these languages. You very often times will run a simulation of your circuit on the computer, and watch as a "wave form" is outputted to you...so you can see the state of each wire, flip-flop, or signal...whether it is a 1 or a 0.

    It is pretty cool stuff.
    My Website

    "Circular logic is good because it is."

  5. #20
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Intel does not include timing information with the present instruction set. I can only gather this means that instruction timing and cycle counts are non-constant and rely on other parameters such as machine state prior to execution, cache state, instruction cache state, etc, etc.

    Modern processors do not fetch, decode, execute like older ones. The newer processors fetch as little as possible and also use branch prediction to speed up the process. The only thing faster than an IF is not testing it at all which is what branch prediction attempts to do.

    It is not possible to time each instruction on a newer AMD or Intel x86 CPU and it has nothing to do with Windows or the operating system. You can, however, obtain an average cycle count across many samples and many executions to get an idea of the time involved for instructions.

    But with modern clock speeds I doubt you will find much difference between instructions and even if you do, you will see the difference is minute. You used to be able to say if a mov ax,bx took 3 cycles then it makes sense that a register to register mov takes at least 3 cycles. Multiply that by how many register to register movs you make and you get your cycle count. You cannot do this on today's processor b/c the process is not as straightforward as it once used to be.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. To find the memory leaks without using any tools
    By asadullah in forum C Programming
    Replies: 2
    Last Post: 05-12-2008, 07:54 AM
  2. Assignment Operator, Memory and Scope
    By SevenThunders in forum C++ Programming
    Replies: 47
    Last Post: 03-31-2008, 06:22 AM
  3. Problem allocating memory.
    By Hulag in forum C Programming
    Replies: 5
    Last Post: 12-11-2003, 12:17 PM
  4. Crazy memory problem with arrays
    By fusikon in forum C++ Programming
    Replies: 9
    Last Post: 01-15-2003, 09:24 PM
  5. memory allocation problem with 2 dimensional array
    By nano_nasa in forum C++ Programming
    Replies: 7
    Last Post: 06-13-2002, 11:34 AM