Changeset: 9ba8b982968c for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9ba8b982968c
Modified Files:
gdk/gdk_atoms.c
Branch: Oct2014
Log Message:
Make that oid and wrd can fall back to int/lng in code that compares types.
This should make sorting oids faster since that should now use inline
int or lng code.
diffs (38 lines):
diff --git a/gdk/gdk_atoms.c b/gdk/gdk_atoms.c
--- a/gdk/gdk_atoms.c
+++ b/gdk/gdk_atoms.c
@@ -1579,6 +1579,8 @@ OIDinit(void)
#endif
GDKflushed = 0;
GDKoid = OIDrand();
+ assert(oid_nil == * (const oid *) ATOMnilptr(TYPE_oid));
+ assert(wrd_nil == * (const wrd *) ATOMnilptr(TYPE_wrd));
return 0;
}
@@ -1725,7 +1727,11 @@ atomDesc BATatoms[MAXATOMS] = {
1, /* linear */
0, /* size */
0, /* align */
- (ptr) &oid_nil, /* atomNull */
+#if SIZEOF_OID == SIZEOF_INT
+ (ptr) &int_nil, /* atomNull */
+#else
+ (ptr) &lng_nil, /* atomNull */
+#endif
(int (*)(const char *, int *, ptr *)) OIDfromStr, /* atomFromStr */
(int (*)(str *, int *, const void *)) OIDtoStr, /* atomToStr */
(void *(*)(void *, stream *, size_t)) voidRead, /* atomRead */
@@ -1848,7 +1854,11 @@ atomDesc BATatoms[MAXATOMS] = {
1, /* linear */
sizeof(oid), /* size */
sizeof(oid), /* align */
- (ptr) &oid_nil, /* atomNull */
+#if SIZEOF_OID == SIZEOF_INT
+ (ptr) &int_nil, /* atomNull */
+#else
+ (ptr) &lng_nil, /* atomNull */
+#endif
(int (*)(const char *, int *, ptr *)) OIDfromStr, /* atomFromStr */
(int (*)(str *, int *, const void *)) OIDtoStr, /* atomToStr */
#if SIZEOF_OID == SIZEOF_INT
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list