Re: linux persistent c application with http protocol?
- From: Ben Bacarisse <ben.usenet@xxxxxxxxx>
- Date: Sat, 28 Jan 2006 17:09:36 +0000
On Sat, 28 Jan 2006 07:23:21 -0800, Francesco wrote:
> for an example i've done it with visual basic net..
>
> Dim i As Integer
> Dim a As Integer
>
> For i = 0 To 290
>
> For a = 0 To 30000
> test_array(i) += 1
> test_array(i) += 2
> test_array(i) -= 3
> test_array(i) += 1
>
> Next
> TextBox3.Text = test_array(i).ToString TextBox3.Refresh()
> Next
> this means that some
> operations...
> on the array... are done 30000*290 times = 8 700 000
I don't know visual basic net so I can't interpret this very well. Does
this do locking on the whole array, just each element or none at all? I
made a (reasonable) assumption about the locking granularity and the
consistency requrements from your original message, but if your are doing
some kind of distributed matrix computation (you do talk about a matrix
rather than individual variables) you may actually have more complex
locking/consistency requirements and I can't tell from this code. You'll
get better answers if you give more detail.
> in php this means
> that i have to open (and close) 8 700 000 times a php script, than store
> the variables of the array somewhere (file or db), open it , edit and
> close it 8 700 000 times..
I doubt that Apache opens the script every time -- that seems to be
missing some rather obvious optimisations, but I am not an expert in its
internals. If you are suggesting that an Apache module reading and
writing files in a RAM disc might be fast enough, then it is possible that
PHP could also be fast enough if it were reading and writing files from a
RAM disc. Please note that I am *not* saying it is. I am just saying
that you are assuming things about how it works and then not comparing
like with like.
> would you like to know how much seconds take the vbnet program to do
> this operation?
> 1 second! :)
I am not sure how the timing of this program helps. That is nice and
fast, but it does not do what you want surely?
--
Ben.
.
- References:
- linux persistent c application with http protocol?
- From: Francesco
- Re: linux persistent c application with http protocol?
- From: Logan Shaw
- Re: linux persistent c application with http protocol?
- From: Francesco
- Re: linux persistent c application with http protocol?
- From: Ben Bacarisse
- Re: linux persistent c application with http protocol?
- From: Francesco
- Re: linux persistent c application with http protocol?
- From: Francesco
- linux persistent c application with http protocol?
- Prev by Date: Re: priority inheritence and ceiling protocol
- Next by Date: Re: What type of algorithm do I need? -- Learning, etc.
- Previous by thread: Re: linux persistent c application with http protocol?
- Next by thread: Re: linux persistent c application with http protocol?
- Index(es):