New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
performance question #3097
Comments
Comment author: administrator
I don't think this speed difference has anything to do with OCaml.
|
Comment author: administrator On Fri, 4 Jan 2002, Xavier Leroy wrote:
i think the problem is the use of FD_SETSIZE in select the value of FD_SETSIZE on aix is
anyway, i did make some changes in select.c and my testprogramm time mess 1000 0.001 real 0m1.036s but i did not test anything else! -- m.becker *** select.c Mon Jan 7 04:53:14 2002 *** 33,63 **** typedef fd_set file_descr_set; ! static int fdlist_to_fdset(value fdlist, file_descr_set *fdset)
! static value fdset_to_fdlist(file_descr_set *fdset, int maxi)
! for (i = maxi; i >= 0; i--) { typedef fd_set file_descr_set; ! static void fdlist_to_fdset(value fdlist, file_descr_set *fdset) ! static value fdset_to_fdlist(file_descr_set *fdset)
! for (i = FD_SETSIZE - 1; i >= 0; i--) { *** 71,78 **** CAMLprim value unix_select(value readfds, value writefds, value exceptfds, value timeout)
*** 82,96 ****
!
! fdlist_to_fdset(readfds, &read); *** 100,111 ****
|
Comment author: administrator
OK, I overlooked this fact :-( Thanks for proving me wrong. I agree
|
Comment author: administrator Implemented more efficient building of return FD lists. XL, 2002-05-06 |
Original bug ID: 738
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
hi,
let time_func func =
begin
Printf.printf "start: %4.9f\n" (Unix.gettimeofday());
func () ;
Printf.printf "end: %4.9f\n" (Unix.gettimeofday())
end
let call_select times time =
let rec tues times =
if (times = 0)
then ()
else begin
ignore (Unix.select [] [] [] time);
tues (times - 1)
end
in
tues times
let _ =
time_func (function () -> call_select (int_of_string Sys.argv.(1))
(float_of_string Sys.argv.(2)))
time messe 1000 0.0
start: 1008862247.689975977
end: 1008862259.975527048
real 0m12.318s
user 0m5.350s
sys 0m0.070s
time messe 1000 0.0
start: 1008862258.931671977
end: 1008862259.318706036
real 0m0.406s
user 0m0.370s
sys 0m0.040s
The text was updated successfully, but these errors were encountered: