Search the web
Sign In
New User? Sign Up
ocaml_beginners · Ocaml Beginners
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.

Messages

  Messages Help
Advanced
Messages 4201 - 4230 of 9747   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Simplify | Expand   (Group by Topic) Author Sort by Date ^
4201
... Yes, ExtLib is work in progress. If there are functions which are missing, then please suggest them or even provide patches. Rich. -- Richard Jones, CTO...
Richard Jones
rwmjones
Offline Send Email
Sep 1, 2005
11:48 am
4202
Hi, I just profiled my implicit surface polygonizer (a conversion of J Bloomenthals graphics gem IV) to see what's taking so long. compare_val is taking 357.32...
Chris Campbell
chrisdanx
Offline Send Email
Sep 1, 2005
7:27 pm
4203
... IIRC, yes. ... Look at the second section of gprof's profile, that describes how long was spent in each call from each function. Look to see which...
Jon Harrop
harropjon
Offline Send Email
Sep 1, 2005
7:38 pm
4204
... Looks like compare_val is being called most by a function camlPolygonizer__equal_113 which must be created by the compiler. Looks like that function is...
Chris Campbell
chrisdanx
Offline Send Email
Sep 1, 2005
8:09 pm
4205
... Try this: let ( =* ) ((x, y, z) : int * int * int) (x', y', z') = x = x && y = y' && z = z' let ( <>* ) ((x, y, z) : int * int * int) (x', y', z') = x <>...
Martin Jambon
BioMim
Offline Send Email
Sep 1, 2005
8:48 pm
4206
... Will do. I just tried an absurdly simple test to see how common compare_val is. For one call on a torus surface function, the following function does 5000+...
Chris Campbell
chrisdanx
Offline Send Email
Sep 1, 2005
10:08 pm
4207
... I am glad you received examples that showed how easy this is... presumably anyone working with networking protocols designed to facilitate the transfer of...
Robert Roessler
robertr959
Offline Send Email
Sep 1, 2005
10:08 pm
4208
I'll try to provide some general advice on this code. ... The types specified in the mli file do not affect the typing in the generated code, i.e. polymorphic...
Jon Harrop
harropjon
Offline Send Email
Sep 2, 2005
12:11 am
4209
Hi, I have the following code snippet: let complete_mgu mgu = let sub k v = Hashtbl.replace mgu k (substitute mgu v) ; () in Hashtbl.iter ( sub ) mgu It simple...
Hugo Ferreira
hugotwo3
Offline Send Email
Sep 2, 2005
10:21 am
4210
... IIRC triples of integers are boxed, resulting, in this case, in four times the allocation overhead compared to using an array or record. Also if you write:...
Richard Jones
rwmjones
Offline Send Email
Sep 2, 2005
12:00 pm
4211
... Indeed, from what you say it looks potentially dangerous. A safe option (but somewhat costlier) would be to store in the hashtable not the values...
Frederic van der Plan...
fplancke2001
Offline Send Email
Sep 2, 2005
12:01 pm
4212
Have you thought about using a Map instead? What you are trying to do can be very nicely expressed using a map operation over a Map, and there can never be...
Richard Jones
rwmjones
Offline Send Email
Sep 2, 2005
12:04 pm
4213
Hi Rich, ... I have opted to simply generate a new hash table when changing values whilst iterating through it. I guess this is equivalent to using Map but...
Hugo Ferreira
hugotwo3
Offline Send Email
Sep 2, 2005
12:29 pm
4214
Frédéric, ... Changing the data to a reference will mean changing quite a bit of code. I will simply use the above function to generate a new hash table and...
Hugo Ferreira
hugotwo3
Offline Send Email
Sep 2, 2005
12:35 pm
4215
... No. triples of integers, record and array of 3 element do have exactly the same in memory representation. What you saying is true only for float. ... ...
Remi Vanicat
dl_ens
Offline Send Email
Sep 2, 2005
12:41 pm
4216
... It is safe in the sense that ML programs are safe (e.g. they cannot segfault) but it will probably give undefined behaviour when it replaces a value in the...
Jon Harrop
harropjon
Offline Send Email
Sep 2, 2005
1:03 pm
4217
Hi Jon, ... When I meant safe it was in regards to execution behavior. ... Both options have been suggested. For now I will simply copy the hash table and...
Hugo Ferreira
hugotwo3
Offline Send Email
Sep 2, 2005
2:28 pm
4218
... Sorry, my internet connection is being very unreliable... :-( ... Right, so "substitution" will not mutate the hash table, just read from it. -- Dr Jon D...
Jon Harrop
harropjon
Offline Send Email
Sep 2, 2005
3:03 pm
4219
Hi Jon, ... No problem. ... Exactly. Hugo F....
Hugo Ferreira
hugotwo3
Offline Send Email
Sep 2, 2005
3:26 pm
4220
... Thanks. I partially rewrote it with type annotations almost everywhere and reduced parameter passing. compare_val still dominates but the over all run...
Chris Campbell
chrisdanx
Offline Send Email
Sep 2, 2005
5:25 pm
4221
... If the OCaml is 2 orders of magnitude slower then something is very wrong... ... Given the results of my ray tracer, I'd expect OCaml to be almost as fast...
Jon Harrop
harropjon
Offline Send Email
Sep 2, 2005
6:39 pm
4222
... What I understand is that all the following cases can happen if you add something during iter: 1) what you add will be scanned by iter because it is added...
Martin Jambon
BioMim
Offline Send Email
Sep 2, 2005
7:06 pm
4223
... Yep. :) ... Yep. My thought is either it is not culling properly or the data structures aren't suitable in terms of complexity (the hash tables probably)...
Chris Campbell
chrisdanx
Offline Send Email
Sep 2, 2005
9:39 pm
4224
While writing a simple parser I decided I would force myself to drop the ever so tempting while loop, and see if I could figure out how to write in a more...
André Næss
andnaess
Offline Send Email
Sep 2, 2005
10:31 pm
4225
... Is that marching cubes/tetrahedra? It would be great to publish an open-source 3D tesselator! ... Yep. I think Jacques overlooked that but it isn't too...
Jon Harrop
harropjon
Offline Send Email
Sep 2, 2005
11:20 pm
4226
... The evaluation order is unspecified in many cases for efficiency. There was a thread about this very recently on caml-list. ... Yes: don't assume that...
Jon Harrop
harropjon
Offline Send Email
Sep 2, 2005
11:37 pm
4227
... Any particular reason behind that in particular? I'm a mite surprised that j and k are being multiplied by the same... ...
David Thomas
david_hd
Online Now Send Email
Sep 3, 2005
1:49 am
4228
... That is probably a typo since let def_hash (i, j, k) = i + (j lsl 10) + (k lsl 20) works almost twice as fast. ...
Radu Grigore
radugrigore
Offline Send Email
Sep 3, 2005
8:37 am
4229
... Yeah, that was a mistake but it actually works just as well as with k<<20, which is what I intended to code. :-) -- Dr Jon D Harrop, Flying Frog...
Jon Harrop
harropjon
Offline Send Email
Sep 3, 2005
11:05 am
4230
... That's weird - it is actually slightly slower here. That's probably because I altered the problem though... -- Dr Jon D Harrop, Flying Frog Consultancy...
Jon Harrop
harropjon
Offline Send Email
Sep 3, 2005
11:06 am
Messages 4201 - 4230 of 9747   Oldest  |  < Older  |  Newer >  |  Newest
Advanced
Add to My Yahoo!      XML What's This?

Copyright © 2007 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help