# which is faster, php or javascript? - Page 4

•  Subject
• Author
• Posted on

## Re: which is faster, php or javascript?

Peter H. Coffin schreef:

Helium?
Erm no, that has little to do with it.
It is all about volume displacement and thus the density (eg gram/liter)
of the matter matters.
The density of feathers is lower than that of iron, it displaces more
volume (air), which has weight too,  hence more upper pressure.

You should find the same effect in a room filled with only helium, or
only hydrogen, or only plain air.
The upper pressure happens anywhere where there is gas. It is only more
obvious when you try to hold down a baloon under water.

Try to measure the weight of a ballon filled with hydrogen on a balance,
and you will see that the effect is real. :-) The bloody thing would
float up instead of pressing the balance down, but still it has mass.

(I expect that serious weighting of an object on a scale should happen
in vacuum to avoid this effect. Or correct for it by knowing the volume
of the object.)

Regards,
Erwin Moller

--
"There are two ways of constructing a software design: One way is to
make it so simple that there are obviously no deficiencies, and the
other way is to make it so complicated that there are no obvious
deficiencies. The first method is far more difficult."
-- C.A.R. Hoare

## Re: which is faster, php or javascript?

On Tue, 26 Jan 2010 17:45:27 +0100, Erwin Moller wrote:

It displace air, WITH AIR, which weighs the same as what it is
displacing.

There isn't any "upper pressure" unless you've got something lighter
than the medium it's in. Feathers are not lighter than air, ergo there
is no "upper pressure". AIR is not lighter than air, ergo there is no
"upper pressure". The entire "upper pressure" is a description of
buoyancy and only works when whatever is buoyant is trapped. Otherwise
it all rapidly escapes until it reaches a level at which it is no longer
buoyant. Feathers don't trap air in any meaningful way, especially not
IN AIR, so no buoyancy issue obtains.

A pile of feathers will both mass the same and weigh the same in an
atmosphere or in a vacuum.

--
81. If I am fighting with the hero atop a moving platform, have
disarmed him, and am about to finish him off and he glances behind
me and drops flat, I too will drop flat instead of quizzically
turning around to find out what he saw.  --Evil Overlord list

## Re: which is faster, php or javascript?

So now we are really comparing 3 different things:

1 kg of iron
1 kg of air
1 kg of feathers (which might partly consist of air or surrond air
depending on how you look on it.)

There is allways pressure in every direction. The pressure from above is
lower than the upper pressure from below as the atmospheric pressure as
well as water pressure increases with depth. As a sum you will get an
"upper pressure" which may or may not be bigger than the downward force
coming from the mass.

The force upward from the "upper pressure" minus the "downward pressure"
is less than the force downward from the mass.

What would happen if you in air select 1 kg of air above one scale of
balance and place 1 kg of iron above another scale of balance? I bet
that in air the scales of balance would indicate a bigger weight for the
iron. What if you placed a feather in your 1 kg of air? Even though this
same volume will have a mass of more than 1 kg it probably still seems to
weigh less than your 1 kg of iron. What about 1 kg of feathers replacing
some of your 1 kg of air? It probably still weighs less than the iron.

regards Henrik
--
hc3(at)poolhem.se Examples of addresses which go to spammers:
root@localhost postmaster@localhost

## Re: which is faster, php or javascript?

Peter H. Coffin wrote:

Unlike the other which displaces air with *something heavier*.

## Re: which is faster, php or javascript?

Peter H. Coffin wrote:

try weighing a lump of metal in the bath then

## Re: which is faster, php or javascript?

On Tue, 26 Jan 2010 11:08:03 -0600, "Peter H. Coffin"

Still waiting for your 'Eureka' moment?
--
Geoff Berrow (Put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs www.ckdog.co.uk/rfdmaker

## Re: which is faster, php or javascript?

On Wed, 27 Jan 2010 08:06:32 +0000, Geoff Berrow wrote:

Nope. I'm wondering how someone's aquiring exactly a kilogram of
feathers without accounting for buoyancy in the first place.

The usual method of aquiring a kilo of feathers is to put them on a
balance against a known kilo mass, and pile on feathers until they
balance. Then you put the iron on the balance instead and make IT mass
a kilo. So long as you're not MOVING the things from one environment
to another, they're going to be the same. If you're counting out your
feathers in microgravity, it'll take a lot more of them to weigh a
kilogram than mass a kilogram. It'll take fewer if you're doing it in a
vacuum. If you're doing it under water, it'll take a lot more as well.
But you can't say how many feathers is a kilogram without accounting for
a whole lot of things. Same deal with the iron: you can even take that
same iron, make a box from it enclosing a vacuum so it displaces more
air too. Does that make it weigh less than feathers, that are filled
with heavy air? Bearing in mind that you have to prove that both are a
kilogram still.

But the experiment, as presented, says NOTHING about where the kilo of
feathers came from, or that they're packed in any particular way, and
the only assumption can be that they were measured out under exactly the
same conditions as the iron and that those conditions still apply for
the weighing. At least, for iron, there's a theoretical number of atoms
in a lump that would make a kilogram of mass, but I sure don't know how
to count them any better than a balance does.

Essentially, you can't say "a kilogram of feathers is lighter" because
there's nothing to compare it to, and if there is a comparison to be
made, then it's not a kilogram of feathers anymore because you got it
wrong in the first place then, and you'll have to add or remove some
feathers to make it a kilogram, by every means that you can measure.

Swinging it back around, the question of "which is faster?" only makes
any kind of sense to ask if you can measure it under ths same conditions
that you're going to test it on. A developer sitting on his home network
with a quad-core Xenon desktop machine and a PII demo server will come
up with a vastly different result with Mom's 8-year-old Dell laptop on a
dial-up line to a quad-core Xenon server.

--
When all you have is a hammer, every problem looks like a messiah.

## Re: which is faster, php or javascript?

On Wed, 27 Jan 2010 12:07:20 -0600, "Peter H. Coffin"

A simple 'Oops I was wrong' will suffice.

A pile of feathers will weigh more in a vacuum (say in a sealed
container at ground level) than a pile of feathers in air because of
the displacement of the air.  Simple physics.

The mass, of course, will be the same.
--
Geoff Berrow (Put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs www.ckdog.co.uk/rfdmaker

## Re: which is faster, php or javascript?

Peter H. Coffin wrote:

mass is inedependent of gravity.
Or weight.

## Re: which is faster, php or javascript?

The trapping or otherwise of air is not the point.

You really haven't understood this at all, have you? The basic principle
is that if you have a substance immersed in a fluid, *in a gravitational
field* (and that was the important point), then it will experience an
upward force equal to the weight (not mass) of fluid displaced. Note
that the substance can itself be a fluid (a good example of this is salt
water sinking in fresh water).

The above is true whatever the densities of the fluid and the substance
involved. If the substance is lower density than the fluid, it will rise
within the fluid (i.e. have negative weight), or float when it reaches
the top. Otherwise, it will sink.

It might help to think of a kg (mass) of aluminium, and a kg of say
gold. The kg of gold will be much smaller than the kg of aluminium, as
it's much denser. So it will displace much less air. The kg of
aluminium, being much larger, will displace more air and will experience
a larger upward force. So it will weigh less in air.

The feathers are a red herring - they are probably made of keratin (like
your finger nails), which I think is heavier than water (not sure about
that though). Feathers just look light and bulky - but then they are
designed to.

--
Tim

"That excessive bail ought not to be required, nor excessive fines imposed,
nor cruel and unusual punishments inflicted"  --  Bill of Rights 1689

## Re: which is faster, php or javascript?

Tim Streater wrote:

they contain a lot of air inside. Check a quill.

So which weighs more, a 1oz plastic ball that  is hollow, and  the same
amount volume of the same plastic making a ball that is hollow but with
holes in in as well.

And will it stay the same weight as it gets hotter?

## Re: which is faster, php or javascript?

On 27/01/2010 14:37, The Natural Philosopher wrote:

So?

By hollow, do you mean there's a vacuum inside? If there's air inside,
then it's gonna depend on whether it's at the same pressure as outside
or not. If the pressure's the same, it's the same as the holed ball. If
it's greater, then it's heavier and vice versa (if you like your vice
versa).

As what gets hotter?

--
Tim

"That excessive bail ought not to be required, nor excessive fines
imposed, nor cruel and unusual punishments inflicted"

Bill of Rights 1689

## Re: which is faster, php or javascript?

Tim Streater wrote:

Ah. So if I put it in water and its made of say aluminium., both will float?

The ball.

## Re: which is faster, php or javascript?

On 27/01/2010 22:14, The Natural Philosopher wrote:

Such a shining wit. If you put both in water, one will have air in it
and the other will have water in it. You can deduce the rest for yourself.

--
Tim

"That excessive bail ought not to be required, nor excessive fines
imposed, nor cruel and unusual punishments inflicted"

Bill of Rights 1689

## Re: which is faster, php or javascript?

Tim Streater wrote:

you still don't get it do you?

## Re: which is faster, php or javascript?

So... Which is denser, php or javascript?

## Re: which is faster, php or javascript?

Mark Smith wrote:

I was going to say javascript, but its full of hot air..

## Re: which is faster, php or javascript?

Erwin Moller wrote:

Indeed. the thought experiment is to see whether a kilo of wood weights
more than a kilo of stone, under water.

## Re: which is faster, php or javascript?

Peter H. Coffin wrote:

Actually, Feynman was correct.  The weight on the scale includes the
pressure of a column of air from the tray all the way to the
stratosphere (and beyond).  If the displacement is the same, the weight
of that column of air is the same and the scale balances.

However, in this case, the feathers displace more air than the lead, so
there is slightly less downward pressure from the air (more upward
pressure).  The difference is slight, but the scale would not balance.

Now, in a vacuum or a sealed container, you are correct - the scale
would balance.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

## Re: which is faster, php or javascript?

Jerry Stuckle schreef:

<snip>

Hi Jerry,

I was having a hard time finding the english word for "upper pressure"
and translated it literally from Dutch (Opwaartse kracht).
I guess the right word was "upward pressure". Right?

Regards,
Erwin Moller

--
"There are two ways of constructing a software design: One way is to
make it so simple that there are obviously no deficiencies, and the
other way is to make it so complicated that there are no obvious
deficiencies. The first method is far more difficult."
-- C.A.R. Hoare