Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror

Comment Re:Is FORTRAN still winning? Was Re:Poor Alan Kay (Score 1) 200

Repeatedly allocating and deallocating can give a huge performance hit, so I tend to do all my allocations before the main loop.

which is the correct way of doing it. Allocating and deallocating, especially larger chunks of memory, requires you to interact with the operating system.
This should off course be avoided in tight loops.

Comment Re:Is FORTRAN still winning? Was Re:Poor Alan Kay (Score 1) 200

I've been writing a scientific simulation in Fortran for half a year now. I usually like to write in some combination of C and Python.

While Fortran does make the life of a compiler writer easier, I think C benefits from being a small and very popular language.
C compilers are just more advanced, which gives it the speed advantage. But the speed difference for most purposes is negligible.
Choosing the right algorithm and approximations is a much more important concern (factors of 10-100-1000 vs. 1.1-1.2-1.3).
Dynamic memory management is not much different from C.

In my experience, Fortran is extremely useful for expressing linear algebra, which is heavily used in quantum mechanics.
At least it is much much better than C. So in terms of programmer efficiency in scientific calculations, I think Fortran beats C by quite a margin.

Fortran sucks at pretty much anything else though. For example, I think it's a lot easier to have a config module (e.g. class) to manage simulation parameters and recompile the whole application every time you change settings than it is to use an actual configuration file.

The next time I write a scientific application, I think I will have Python handle the logistics (parallelization, files, user input, etc.) and let Fortran do the (heavy) computations.

Comment Re:Space/time duration/distance (Score 3, Interesting) 81

Seven billion light years away (seven billion years ago)

I may not have this right, but due to the expansion of space, wouldn't it have been closer than seven billion light years away at the time of the kaboom? And if the light's taken seven billion light years to get here, space will have expanded further, so the remnants would now be further than seven billion light years away. Right?

Or is this the sort of thing where you can be specific about the distance, or the time, but not both?

Wikipedia has an answer, but I think the above is just meant to give the layman some rough understanding of what's going on.

Beware that it is extremely difficult to measure these kinds of distances exactly. The figure may be a few orders of magnitude wrong, so whether you take into account the expanding universe or not may not be that important...
Cosmologists measure everything in gigaparsec. 7b light years is only 0.3 GPc so it may not be that important.

Comment Re:256 qbit per atom? (Score 1) 135

Not exactly. They have quite some clever ways to handle these Rydberg states in neutral atoms. They use hyperfine splitting to get a large amount of qbits in single atoms.

See Rev. Mod. Phys. 82, 2313–2363 (2010) (http://rmp.aps.org/abstract/RMP/v82/i3/p2313_1)

Slashdot Top Deals

"The one charm of marriage is that it makes a life of deception a neccessity." - Oscar Wilde

Working...