--f46d0418253ce774cd051521cc5a Content-Type: text/plain; charset=UTF-8 Howard thank you for taking the time to explain your reasoning.
I am curious if I were remove the conditional compilation would the patch be more palatable. Because usually if you are using an interpreted language you are already taking a performance hit. Also it only slows your program down if you use the compare functions. If answer is still no I will just maintain the patch in my own branch. James Rouzier. On Sat, May 2, 2015 at 6:04 PM, Howard Chu <[email protected]> wrote: > [email protected] wrote: > >> Full_Name: James Rouzier >> Version: LMDB mdb.master >> OS: N/A >> URL: >> https://github.com/rouzier/openldap/commit/33f1dc8be4a8503e78930f130ff9c8e5aa9bfa7b >> Submission from: (NULL) (70.81.32.80) >> >> >> New feature inclusion request: "Context for compare functions" >> >> I am finishing up a new perl module which is a very thin wrapper for LMDB. >> (The current perl LMDB module does not fit my needs as it does not support >> NO_TLS really support). >> >> When looking at mdb_set_compare and mdb_set_dupsort. >> >> There were three choices. >> >> * Not support mdb_set_compare, mdb_set_dupsort in the module. >> * Capture each mdb_*(del|put|get) function to figure which dbi I am using. >> * Add support for contexts in the compare functions. >> >> So I decided on the latter. >> >> I understand that passing a context for each compare can add some >> overhead. >> So I made this feature optional it is only enabled if the macro >> MDB_CMP_CTX is >> enabled. >> > > I don't see supporting compare functions in interpreted languages being a > realistic/worthwhile thing to do. The difference in performance is orders > of magnitude. > > I also don't believe such conditional compilation is a good idea. LMDB is > designed to be simple, to have very few options, and to Just Work the same > on every platform. Conditionally compiled features are horrible because you > can't guess which features will be present in a system-installed library. > > -- > -- Howard Chu > CTO, Symas Corp. http://www.symas.com > Director, Highland Sun http://highlandsun.com/hyc/ > Chief Architect, OpenLDAP http://www.openldap.org/project/ > --f46d0418253ce774cd051521cc5a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_quote"><div dir=3D"ltr">Howard thank y= ou for taking the time to explain your reasoning.<div><br></div><div>I am c= urious if I were remove the conditional compilation would the patch be more= palatable.</div><div>Because usually if you are using an=C2=A0<span style= =3D"font-size:12.8000001907349px">interpreted</span>=C2=A0language you are = already taking a performance hit.</div><div>Also it only slows your program= down if you use the=C2=A0<span style=3D"font-size:12.8000001907349px">comp= are functions.</span></div><div><br></div><div>If answer is still no I will= just maintain the patch in my own branch.<span class=3D"HOEnZb"><font colo= r=3D"#888888"><br></font></span></div><span class=3D"HOEnZb"><font color=3D= "#888888"><div><br></div><div>James Rouzier.</div><div><br><br></div><div><= br></div><div><br></div><div><br></div></font></span></div><div class=3D"HO= EnZb"><div class=3D"h5"><div class=3D"gmail_extra"><br><div class=3D"gmail_= quote">On Sat, May 2, 2015 at 6:04 PM, Howard Chu <span dir=3D"ltr"><<a = href=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a>></span= > wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bo= rder-left:1px #ccc solid;padding-left:1ex"><a href=3D"mailto:rouzier@gmail.= com" target=3D"_blank">[email protected]</a> wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"> Full_Name: James Rouzier<br> Version: LMDB mdb.master<br> OS: N/A<br> URL: <a href=3D"https://github.com/rouzier/openldap/commit/33f1dc8be4a8503e= 78930f130ff9c8e5aa9bfa7b" target=3D"_blank">https://github.com/rouzier/open= ldap/commit/33f1dc8be4a8503e78930f130ff9c8e5aa9bfa7b</a><br> Submission from: (NULL) (70.81.32.80)<br> <br> <br> New feature inclusion request: "Context for compare functions"<br= > <br> I am finishing up a new perl module which is a very thin wrapper for LMDB.<= br> (The current perl LMDB module does not fit my needs as it does not support<= br> NO_TLS really support).<br> <br> When looking at mdb_set_compare and mdb_set_dupsort.<br> <br> There were three choices.<br> <br> * Not support mdb_set_compare, mdb_set_dupsort in the module.<br> * Capture each mdb_*(del|put|get) function to figure which dbi I am using.<= br> * Add support for contexts in the compare functions.<br> <br> So I decided on the latter.<br> <br> I understand that passing a context for each compare can add some overhead.= <br> So I made this feature optional it is only enabled if the macro MDB_CMP_CTX= is<br> enabled.<br> </blockquote> <br> I don't see supporting compare functions in interpreted languages being= a realistic/worthwhile thing to do. The difference in performance is order= s of magnitude.<br> <br> I also don't believe such conditional compilation is a good idea. LMDB = is designed to be simple, to have very few options, and to Just Work the sa= me on every platform. Conditionally compiled features are horrible because = you can't guess which features will be present in a system-installed li= brary.<span><font color=3D"#888888"><br> <br> -- <br> =C2=A0 -- Howard Chu<br> =C2=A0 CTO, Symas Corp.=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0<a href=3D"= http://www.symas.com" target=3D"_blank">http://www.symas.com</a><br> =C2=A0 Director, Highland Sun=C2=A0 =C2=A0 =C2=A0<a href=3D"http://highland= sun.com/hyc/" target=3D"_blank">http://highlandsun.com/hyc/</a><br> =C2=A0 Chief Architect, OpenLDAP=C2=A0 <a href=3D"http://www.openldap.org/p= roject/" target=3D"_blank">http://www.openldap.org/project/</a><br> </font></span></blockquote></div><br></div> </div></div></div><br></div> --f46d0418253ce774cd051521cc5a--
